fixed job refresh issues
This commit is contained in:
4
job.py
4
job.py
@@ -135,7 +135,9 @@ def joblog(id):
|
||||
logs=Joblog.query.filter(Joblog.job_id==id).order_by(Joblog.log_date).all()
|
||||
display_more=False
|
||||
order="asc"
|
||||
refresh=False
|
||||
else:
|
||||
refresh=True
|
||||
log_cnt = db.session.execute( f"select count(id) from joblog where job_id = {id}" ).first()[0]
|
||||
newest_logs = Joblog.query.filter(Joblog.job_id==id).order_by(Joblog.log_date.desc() ).limit(NEWEST_LOG_LIMIT).all()
|
||||
oldest_logs = Joblog.query.filter(Joblog.job_id==id).order_by(Joblog.log_date).limit(OLDEST_LOG_LIMIT).all()
|
||||
@@ -158,7 +160,7 @@ def joblog(id):
|
||||
estimate_s = duration_s / joblog.current_file_num * joblog.num_files
|
||||
estimate = timedelta( seconds=(estimate_s-duration_s) )
|
||||
estimate = estimate - timedelta(microseconds=estimate.microseconds)
|
||||
return render_template("joblog.html", job=joblog, logs=logs, duration=duration, display_more=display_more, order=order, estimate=estimate)
|
||||
return render_template("joblog.html", job=joblog, logs=logs, duration=duration, display_more=display_more, order=order, estimate=estimate, refresh=refresh)
|
||||
|
||||
###############################################################################
|
||||
# /wakeup -> GET -> forces the job manager to wake up, and check the queue
|
||||
|
||||
Reference in New Issue
Block a user