Updated Celery pattern
The given pattern caused Celery to lose the current Context
This commit is contained in:
parent
cd13a5cf62
commit
2b03eca1b7
1 changed files with 1 additions and 1 deletions
|
|
@ -44,7 +44,7 @@ This is all that is necessary to properly integrate Celery with Flask::
|
|||
abstract = True
|
||||
def __call__(self, *args, **kwargs):
|
||||
with app.app_context():
|
||||
return TaskBase.__call__(self, *args, **kwargs)
|
||||
return self.run(*args, **kwargs)
|
||||
celery.Task = ContextTask
|
||||
return celery
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue