void launchJob (in long job_id) raises (SALOME::SALOME_Exception);
string getJobState (in long job_id) raises (SALOME::SALOME_Exception);
void getJobResults(in long job_id, in string directory) raises (SALOME::SALOME_Exception);
+ boolean getJobDumpState(in long job_id, in string directory) raises (SALOME::SALOME_Exception);
void removeJob (in long job_id) raises (SALOME::SALOME_Exception);
// Useful methods
LAUNCHER_MESSAGE("getJobResult ended");
}
+//=============================================================================
+/*!
+ * Get Job dump state - the result directory could be changed
+ */
+//=============================================================================
+bool
+Launcher_cpp::getJobDumpState(int job_id, std::string directory)
+{
+ bool rtn;
+ LAUNCHER_MESSAGE("Get Job dump state");
+
+ // 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;
+ std::string resource_name = job->getResourceDefinition().Name;
+ try
+ {
+ if (directory != "")
+ rtn = _batchmap[resource_name]->importDumpStateFile(*(job->getBatchJob()), directory);
+ else
+ rtn = _batchmap[resource_name]->importDumpStateFile(*(job->getBatchJob()), job->getResultDirectory());
+ }
+ catch(const Batch::EmulationException &ex)
+ {
+ LAUNCHER_INFOS("getJobResult is maybe incomplete, exception: " << ex.message);
+ throw LauncherException(ex.message.c_str());
+ }
+ LAUNCHER_MESSAGE("getJobResult ended");
+ return rtn;
+}
+
//=============================================================================
/*!
* Remove the job - into the Launcher and its batch manager
void launchJob(int job_id);
const char * getJobState(int job_id);
void getJobResults(int job_id, std::string directory);
+ bool getJobDumpState(int job_id, std::string directory);
void removeJob(int job_id);
// Useful methods
}
}
+CORBA::Boolean
+SALOME_Launcher::getJobDumpState(CORBA::Long job_id, const char * directory)
+{
+ CORBA::Boolean rtn = false;
+ try
+ {
+ rtn = _l.getJobDumpState(job_id, directory);
+ }
+ catch(const LauncherException &ex)
+ {
+ INFOS(ex.msg.c_str());
+ THROW_SALOME_CORBA_EXCEPTION(ex.msg.c_str(),SALOME::BAD_PARAM);
+ }
+ return rtn;
+}
+
void
SALOME_Launcher::removeJob(CORBA::Long job_id)
{
void launchJob (CORBA::Long job_id);
char * getJobState (CORBA::Long job_id);
void getJobResults(CORBA::Long job_id, const char * directory);
+ CORBA::Boolean getJobDumpState(CORBA::Long job_id, const char * directory);
void removeJob (CORBA::Long job_id);
// Useful methods