*/
boolean getJobDumpState(in long job_id, in string directory) raises (SALOME::SALOME_Exception);
+ //! Remove the working directory on the remote file system.
+ /*!
+ \param job_id Job id returned by createJob().
+ */
+ void clearJobWorkingDir(in long job_id) raises (SALOME::SALOME_Exception);
+
//! Retrieve one sigle file from the working directory.
/*! Use this method if you don't want to copy all the results of the job,
for instance if you want to obtain a file which contains the computing
LAUNCHER_MESSAGE("getJobResult ended");
}
+//=============================================================================
+/*!
+ * Clear the remote working directory
+ */
+//=============================================================================
+void
+Launcher_cpp::clearJobWorkingDir(int job_id)
+{
+ LAUNCHER_MESSAGE("Clear the remote working directory");
+
+ // Check if job exist
+ std::map<int, Launcher::Job *>::const_iterator it_job = _launcher_job_map.find(job_id);
+ if (it_job == _launcher_job_map.end())
+ {
+ LAUNCHER_INFOS("Cannot find the job, is it created ? job number: " << job_id);
+ throw LauncherException("Cannot find the job, is it created ?");
+ }
+
+ Launcher::Job * job = it_job->second;
+ try
+ {
+ _batchmap[job_id]->clearWorkingDir(*(job->getBatchJob()));
+ }
+ catch(const Batch::GenericException &ex)
+ {
+ LAUNCHER_INFOS("getJobResult is maybe incomplete, exception: " << ex.message);
+ throw LauncherException(ex.message.c_str());
+ }
+ LAUNCHER_MESSAGE("getJobResult ended");
+}
+
//=============================================================================
/*!
* Get Job dump state - the result directory could be changed
const char * getJobState(int job_id);
const char * getAssignedHostnames(int job_id); // Get names or ids of hosts assigned to the job
void getJobResults(int job_id, std::string directory);
+ void clearJobWorkingDir(int job_id);
bool getJobDumpState(int job_id, std::string directory);
bool getJobWorkFile(int job_id, std::string work_file, std::string directory);
void stopJob(int job_id);
}
}
+void
+SALOME_Launcher::clearJobWorkingDir(CORBA::Long job_id)
+{
+ try
+ {
+ _l.clearJobWorkingDir(job_id);
+ }
+ catch(const LauncherException &ex)
+ {
+ INFOS(ex.msg.c_str());
+ THROW_SALOME_CORBA_EXCEPTION(ex.msg.c_str(),SALOME::BAD_PARAM);
+ }
+}
+
CORBA::Boolean
SALOME_Launcher::getJobDumpState(CORBA::Long job_id, const char * directory)
{
char * getJobState (CORBA::Long job_id);
char * getAssignedHostnames (CORBA::Long job_id); // Get names or ids of hosts assigned to the job
void getJobResults(CORBA::Long job_id, const char * directory);
+ void clearJobWorkingDir(CORBA::Long job_id);
CORBA::Boolean getJobDumpState(CORBA::Long job_id, const char * directory);
CORBA::Boolean getJobWorkFile(CORBA::Long job_id, const char * work_file, const char * directory);
void stopJob (CORBA::Long job_id);