fixed job refresh issues
This commit is contained in:
3
BUGs
3
BUGs
@@ -1,6 +1,7 @@
|
||||
### Next: 79
|
||||
### Next: 80
|
||||
BUG-56: when making a viewing list of AI:mich, (any search?) and going past the page_size, it gets the wrong data from the DB for the 'next' entry
|
||||
BUG-60: entries per page (in folders view) ignores pagesize, and this also contributes to BUG-56 I think
|
||||
BUG-74: search/others? remembers start/offset, and if you reset view (e.g. another search) it doesnt show first page of results
|
||||
BUG-77: when moving folders out from a parent folder (storage/2020 off-camera-to-oct), it did not delete the empty 2020 off-camera-to-oct folder
|
||||
-- something odd happened here, not sure it is a bug, maybe dodgy data at the time in the DB?
|
||||
BUG-79: changing size does not post back the OPT change, so doesn't save to prefs (unless you change say how_many after size)
|
||||
|
||||
2
TODO
2
TODO
@@ -1,6 +1,4 @@
|
||||
## GENERAL
|
||||
* seems the job refresh is no longer working?
|
||||
|
||||
* put back AI jobs auto after scan (& setting for this?)
|
||||
|
||||
* CleanUpInDir()
|
||||
|
||||
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
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
{% endblock main_content %}
|
||||
{% block script_content %}
|
||||
<script>
|
||||
{% if display_more and job.pa_job_state != "Completed" %}
|
||||
{% if refresh and job.pa_job_state != "Completed" %}
|
||||
setTimeout(function(){ window.location.reload(1); }, 3000 )
|
||||
{% endif %}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user