From ec44ae900a5b87feb900667c1ea297035cd7fb8a Mon Sep 17 00:00:00 2001 From: gdd Date: Fri, 30 Jul 2010 14:08:57 +0000 Subject: [PATCH] AR with GD: Can now load SALOME jobs --- src/Launcher/Launcher.hxx | 3 ++- src/Launcher/SALOME_Launcher.cxx | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Launcher/Launcher.hxx b/src/Launcher/Launcher.hxx index 662112034..57aabac59 100644 --- a/src/Launcher/Launcher.hxx +++ b/src/Launcher/Launcher.hxx @@ -73,6 +73,8 @@ public: // Lib methods void SetResourcesManager( ResourcesManager_cpp* rm ) {_ResManager = rm;} + // Used by SALOME_Launcher + ResourcesManager_cpp *_ResManager; protected: virtual void notifyObservers(const std::string & event_name, const std::string & event_data) {} @@ -84,7 +86,6 @@ protected: #endif ParserLauncherType ParseXmlFile(std::string xmlExecuteFile); - ResourcesManager_cpp *_ResManager; std::map _launcher_job_map; int _job_cpt; // job number counter pthread_mutex_t * _job_cpt_mutex; // mutex for job counter diff --git a/src/Launcher/SALOME_Launcher.cxx b/src/Launcher/SALOME_Launcher.cxx index 27956bded..89f4e9c3d 100644 --- a/src/Launcher/SALOME_Launcher.cxx +++ b/src/Launcher/SALOME_Launcher.cxx @@ -782,8 +782,7 @@ SALOME_Launcher::loadJobs(const char* jobs_file) new_job->setState(job_state); // Step 3: We add the job to the launcher - ParserResourcesType resource_definition; - resource_definition.Name = resource_choosed_name; + ParserResourcesType resource_definition = _l._ResManager->GetResourcesDescr(resource_choosed_name); new_job->setResourceDefinition(resource_definition); _l.addJobDirectlyToMap(new_job, job_reference); @@ -818,8 +817,7 @@ SALOME_Launcher::loadJobs(const char* jobs_file) new_job->setState(job_state); // Step 3: We add the job to the launcher - ParserResourcesType resource_definition; - resource_definition.Name = resource_choosed_name; + ParserResourcesType resource_definition = _l._ResManager->GetResourcesDescr(resource_choosed_name); new_job->setResourceDefinition(resource_definition); _l.addJobDirectlyToMap(new_job, job_reference); -- 2.39.2