Enhance delete_job method.

This commit is contained in:
Stephan Porada
2019-09-16 14:09:07 +02:00
parent 9005c583ca
commit ba838eaf1f
3 changed files with 11 additions and 5 deletions

View File

@ -155,7 +155,7 @@ def delete_job(job_id):
db.session.refresh(job)
if job.status == 'deleted':
logger.warning('Job status is deleted.')
time.sleep(5)
job.delete_job()
time.sleep(5) # Wait 5 seconds before deleteing job and job files
job.delete_job() # See delete_job() method for further explanation
deleted = True
return redirect(url_for('main.dashboard'))