Files
notifications-api/app/dao/jobs_dao.py
Martyn Inglis b3884e2d6c Move job processing into celery
- brings boto S3 into new AWS folder
- CSV processing utils method

Rejigs the jobs rest endpoint - removes some now unused endpoints,

Calls to the task with the job, job processing in task, delegating SMS calls to the sms task
2016-02-24 17:12:30 +00:00

25 lines
522 B
Python

from app import db
from app.models import Job
def dao_get_job_by_service_id_and_job_id(service_id, job_id):
return Job.query.filter_by(service_id=service_id, id=job_id).first()
def dao_get_jobs_by_service_id(service_id):
return Job.query.filter_by(service_id=service_id).all()
def dao_get_job_by_id(job_id):
return Job.query.filter_by(id=job_id).first()
def dao_create_job(job):
db.session.add(job)
db.session.commit()
def dao_update_job(job):
db.session.add(job)
db.session.commit()