mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-04 04:12:45 +00:00 
			
		
		
		
	Restructure code and use APScheduler for daemon functionality
This commit is contained in:
		@@ -58,6 +58,23 @@ def download_job_input(job_id, job_input_id):
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@bp.route('/<hashid:job_id>/log')
 | 
			
		||||
@login_required
 | 
			
		||||
@admin_required
 | 
			
		||||
def job_log(job_id):
 | 
			
		||||
    job = Job.query.get_or_404(job_id)
 | 
			
		||||
    if job.status not in [JobStatus.COMPLETED, JobStatus.FAILED]:
 | 
			
		||||
        flash(
 | 
			
		||||
            f'Can\'t restart job "{job.title}": Status is not "Completed/Failed"',  # noqa
 | 
			
		||||
            category='error'
 | 
			
		||||
        )
 | 
			
		||||
    return send_from_directory(
 | 
			
		||||
        attachment_filename=f'job_{job.hashid}_log.txt',
 | 
			
		||||
        directory=os.path.join(job.path, 'pipeline_data'),
 | 
			
		||||
        filename=os.path.join('logs', 'pyflow_log.txt')
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@bp.route('/<hashid:job_id>/restart')
 | 
			
		||||
@login_required
 | 
			
		||||
@admin_required
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user