allow NewJob to have job extras added
This commit is contained in:
6
job.py
6
job.py
@@ -73,10 +73,14 @@ def WakePAJobManager():
|
||||
# NewJob takes a name (which will be matched in pa_job_manager.py to run
|
||||
# the appropriate job - which will update the Job() until complete
|
||||
###############################################################################
|
||||
def NewJob(name, num_files="0", wait_for=None ):
|
||||
def NewJob(name, num_files="0", wait_for=None, jex=None ):
|
||||
job=Job(start_time='now()', last_update='now()', name=name, state="New", num_files=num_files,
|
||||
current_file_num=0, current_file='',
|
||||
wait_for=wait_for, pa_job_state="New" )
|
||||
if jex != None:
|
||||
for e in jex:
|
||||
job.extra.append(e)
|
||||
|
||||
db.session.add(job)
|
||||
db.session.commit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user