diff --git a/da/baseclasses/platform.py b/da/baseclasses/platform.py index d2a051f015429661fbf0ce7502eae78138965878..abb08403f197b799eb2a34630c121763a690db68 100755 --- a/da/baseclasses/platform.py +++ b/da/baseclasses/platform.py @@ -65,15 +65,14 @@ class PlatForm(object): return os.environ['JOB_ID'] def UnsuspendCommand(self): - return 'qmod -usj %s'%(self.GetMyID()) + """ Provide shell command to resume this job, or nothing if there is no suspension of the current job while a child process executes """ + + return 'exit 0' def SuspendJob(self): """ Method suspends the running job""" - cmd = ['qmod','-sj',self.GetMyID()] - output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0] ; logging.info(output) - - + return None def WriteJob(self,DaCycle,template, jobid): """ This method writes a jobfile to the exec dir""" @@ -96,17 +95,17 @@ class PlatForm(object): """ This method submits a jobfile to the queue, and returns the queue ID """ cmd = ['sh',jobfile] - msg = "A new job will be submitted (%s)\n\n\n"%cmd ; logging.debug(msg) - jobid = subprocess.call(cmd) + msg = "A new task will be started (%s)\n\n\n"%cmd ; logging.debug(msg) + process = subprocess.Popen(cmd) + jobid = subprocess.Popen(cmd).pid + dummy = subprocess.Popen(cmd).wait() return jobid def KillJob(self,jobid): """ This method kills a running job """ - output = subprocess.Popen(['qdel',jobid], stdout=subprocess.PIPE).communicate()[0] ; logging.info(output) - - return output + return None def StatJob(self,jobid): """ This method gets the status of a running job """