diff --git a/job.py b/job.py index 7257e33..f650a0e 100644 --- a/job.py +++ b/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()