Browse Source

Updated Celery pattern

The given pattern caused Celery to lose the current Context
pull/2055/head
Geoffrey Bauduin 8 years ago
parent
commit
2b03eca1b7
  1. 2
      docs/patterns/celery.rst

2
docs/patterns/celery.rst

@ -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…
Cancel
Save