update start time of jobs to when they actually are starting to run, should also help with durations being more accurate. Also added a catch-all force job finish if one is not done already. Will stop it enetering an endless loop
This commit is contained in:
@@ -271,6 +271,7 @@ def AddLogForJob(job, message, current_file=''):
|
|||||||
|
|
||||||
def RunJob(job):
|
def RunJob(job):
|
||||||
# session = Session()
|
# session = Session()
|
||||||
|
job.start_time=datetime.now(pytz.utc)
|
||||||
if job.name =="scannow":
|
if job.name =="scannow":
|
||||||
JobScanNow(job)
|
JobScanNow(job)
|
||||||
elif job.name =="forcescan":
|
elif job.name =="forcescan":
|
||||||
@@ -285,6 +286,8 @@ def RunJob(job):
|
|||||||
print("ERROR: Requested to process unknown job type: {}".format(job.name))
|
print("ERROR: Requested to process unknown job type: {}".format(job.name))
|
||||||
# okay, we finished a job, so check for any jobs that are dependant on this and run them...
|
# okay, we finished a job, so check for any jobs that are dependant on this and run them...
|
||||||
# session.close()
|
# session.close()
|
||||||
|
if job.pa_job_state != "Completed":
|
||||||
|
FinishJob(job, "PA Job Manager - This is a catchall to close of a Job, this sould never be seen and implies a job did not complete formally?", "Failed" )
|
||||||
HandleJobs()
|
HandleJobs()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user