]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Launcher persistence layer does not depend on libbatch anymore
authorbarate <barate>
Fri, 11 Oct 2013 16:05:00 +0000 (16:05 +0000)
committerbarate <barate>
Fri, 11 Oct 2013 16:05:00 +0000 (16:05 +0000)
src/Launcher/Launcher.cxx
src/Launcher/Launcher_Job.hxx
src/Launcher/Launcher_XML_Persistence.cxx

index 0d905d8d7a46d2717247b6d8db3686845e16466e..cda4fb392c5472f4025d1e35ec4373a0985e3eb9 100644 (file)
@@ -146,6 +146,7 @@ Launcher_cpp::launchJob(int job_id)
     Batch::JobId batch_manager_job_id = _batchmap[job_id]->submitJob(*(job->getBatchJob()));
     job->setBatchManagerJobId(batch_manager_job_id);
     job->setState("QUEUED");
+    job->setReference(batch_manager_job_id.getReference());
   }
   catch(const Batch::GenericException &ex)
   {
index e2674c6e531b493be1e1d5cab673dcef8b4c28ba..41005e303997a8dbc8030530a0edc80ef4ab52ab 100644 (file)
@@ -155,7 +155,7 @@ namespace Launcher
       std::string _queue;
       bool _exclusive;
       unsigned long _mem_per_cpu;
-      std::string _reference;
+      std::string _reference; //! Reference of the job for the batch manager
 
          // Parameters for COORM
          std::string _launcher_file;
index 511ffd223b1002d673642c1881b0a637bed2916c..547ea8d1d72ea963220be63ced56217cad8ebfbd 100644 (file)
@@ -612,11 +612,7 @@ XML_Persistence::addJobToXmlDocument(xmlNodePtr root_node, const Job & job)
   xmlNewChild(run_node, NULL, xmlCharStrdup("job_state"), xmlCharStrdup(job.getState().c_str()));
   ParserResourcesType resource_definition = job.getResourceDefinition();
   xmlNewChild(run_node, NULL, xmlCharStrdup("resource_choosed_name"), xmlCharStrdup(resource_definition.Name.c_str()));
-
-#ifdef WITH_LIBBATCH
-  Batch::JobId job_id = job.getBatchManagerJobId();
-  xmlNewChild(run_node, NULL, xmlCharStrdup("job_reference"), xmlCharStrdup(job_id.getReference().c_str()));
-#endif
+  xmlNewChild(run_node, NULL, xmlCharStrdup("job_reference"), xmlCharStrdup(job.getReference().c_str()));
 }
 
 }