Make the app arg in @background functions a bit less magical

This commit is contained in:
Patrick Jentsch
2020-04-23 08:35:18 +02:00
parent 83c05d93b0
commit 3a989534cf
4 changed files with 12 additions and 10 deletions

View File

@ -7,7 +7,8 @@ import shutil
@background
def delete_job(app, job_id):
def delete_job(job_id, *args, **kwargs):
app = kwargs['app']
with app.app_context():
job = Job.query.get(job_id)
if job is None: