Update job status to ready to send, indicating the file for the job has been uploaded to S3.

This commit is contained in:
Rebecca Law
2017-04-05 11:57:56 +01:00
parent 3783a449b7
commit c49217b1bf
4 changed files with 77 additions and 40 deletions

View File

@@ -116,6 +116,11 @@ def dao_update_job(job):
db.session.commit()
def dao_update_job_status(job_id, status):
db.session.query(Job).filter_by(id=job_id).update({'job_status': status})
db.session.commit()
def dao_get_jobs_older_than(limit_days):
return Job.query.filter(
cast(Job.created_at, sql_date) < days_ago(limit_days)