Best practices: flask and celery custom classes
- Viacheslav Biriukov
- 2014-02-14 @ 20:25
There is a snippet in documentation, that explains how to use application
context with celery tasks: http://flask.pocoo.org/docs/patterns/celery/.
But what is the best practice if you want to use Celery custom tasks. For
example I have several task's classes for doing some different stuff. So I
use following decorators:
How to be in this cases if I want to have application context in all of
What if I want to have an application context not only in __call__() but
also in after_return() and success() Celery stages?