fixed 2 x TODOs, can now add an existing face as a refimg, and I sped up the recent jobs page
This commit is contained in:
4
job.py
4
job.py
@@ -171,7 +171,9 @@ def jobs():
|
||||
jobs = Job.query.order_by(Job.id.desc()).all()
|
||||
else:
|
||||
page_title='Job list (recent)'
|
||||
jobs = Job.query.filter( Job.last_update >= (func.now() - func.cast(concat(settings.job_archive_age, 'DAYS'), INTERVAL)) ).order_by(Job.id.desc()).all()
|
||||
# work out cutoff in python (used to do this in sql and it was too slow)
|
||||
cutoff = datetime.now() - timedelta(days=settings.job_archive_age)
|
||||
jobs = Job.query.filter( Job.last_update >= cutoff ).order_by(Job.id.desc()).all()
|
||||
return render_template("jobs.html", jobs=jobs, page_title=page_title)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user