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