Commit 4be68deb authored by Peters, Wouter's avatar Peters, Wouter
Browse files

updated platform for interactive runs

parent 8228d2b1
......@@ -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] ;
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 =
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] ;
return output
return None
def StatJob(self,jobid):
""" This method gets the status of a running job """
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment