if restarting a job, reset file numbering/current_file

This commit is contained in:
2022-07-17 15:56:50 +10:00
parent a1245151d3
commit d08d10a3ae

4
job.py
View File

@@ -181,6 +181,10 @@ def stale_job(id):
log=Joblog( job_id=id, log="(Stale) Job restarted manually by user", log_date=now )
job.pa_job_state='New'
job.state='New'
# reset state of job too, it should seem as new, and recalc/reset these items
job.num_files=0
job.current_file=''
job.current_file_num=0
elif request.form['action'] == "cancel":
log=Joblog( job_id=id, log="(Stale) Job withdrawn manually by user", log_date=now )
job.pa_job_state='Completed'