mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-03 20:02:47 +00:00 
			
		
		
		
	Codestyle enhancements
This commit is contained in:
		@@ -48,10 +48,10 @@ def download_job_input(job_id, job_input_id):
 | 
			
		||||
def restart(job_id):
 | 
			
		||||
    job = Job.query.get_or_404(job_id)
 | 
			
		||||
    if job.status not in ['complete', 'failed']:
 | 
			
		||||
        flash('Can not restart job "{}": Status is not "complete/failed"'.format(job.title), 'error')  # noqa
 | 
			
		||||
        flash(f'Can not restart job "{job.title}": Status is not "complete/failed"', 'error')  # noqa
 | 
			
		||||
    else:
 | 
			
		||||
        tasks.restart_job(job_id)
 | 
			
		||||
        flash('Job "{}" has been marked to get restarted!'.format(job.title), 'job')  # noqa
 | 
			
		||||
        flash(f'Job "{job.title}" marked to get restarted!', 'job')
 | 
			
		||||
    return redirect(url_for('.job', job_id=job_id))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@ def delete_job(job_id, *args, **kwargs):
 | 
			
		||||
    with kwargs['app'].app_context():
 | 
			
		||||
        job = Job.query.get(job_id)
 | 
			
		||||
        if job is None:
 | 
			
		||||
            raise Exception('Job {} not found'.format(job_id))
 | 
			
		||||
            raise Exception(f'Job {job_id} not found')
 | 
			
		||||
        job.delete()
 | 
			
		||||
        db.session.commit()
 | 
			
		||||
 | 
			
		||||
@@ -18,7 +18,7 @@ def restart_job(job_id, *args, **kwargs):
 | 
			
		||||
    with kwargs['app'].app_context():
 | 
			
		||||
        job = Job.query.get(job_id)
 | 
			
		||||
        if job is None:
 | 
			
		||||
            raise Exception('Job {} not found'.format(job_id))
 | 
			
		||||
            raise Exception(f'Job {job_id} not found')
 | 
			
		||||
        try:
 | 
			
		||||
            job.restart()
 | 
			
		||||
        except Exception:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user