2019-11-14 12:40:05 +00:00
|
|
|
from app.models import Job
|
|
|
|
|
|
|
|
|
|
|
|
def delete_job_(app, job_id):
|
|
|
|
with app.app_context():
|
2019-11-15 12:09:12 +00:00
|
|
|
job = Job.query.get(job_id)
|
2019-11-14 12:40:05 +00:00
|
|
|
if job is None:
|
|
|
|
raise Exception('Job {} not found!'.format(job_id))
|
|
|
|
job.delete()
|