Move file deletion to model methods. add restart job button.

This commit is contained in:
Patrick Jentsch
2020-07-09 15:07:43 +02:00
parent e20a6a31d9
commit f86f3f4fd5
4 changed files with 32 additions and 34 deletions

View File

@@ -56,7 +56,7 @@ def download_job_input(job_id, job_input_id):
def restart(job_id):
job = Job.query.get_or_404(job_id)
if job.status != 'failed':
flash('Job can not be restarted!', 'job')
flash('Could not restart job: status is not "failed"', 'error')
else:
tasks.restart_job(job_id)
flash('Job has been restarted!', 'job')