Changeset - 01cb988e82a5
default
0
2
0
celery: celery-run should only initialize app and sqlalchemy after workers have been forked
If app and SqlAlchemy were initialized before launching celery, the forked
workers would inherit the database connection ... and that doesn't work.
This could be handled by disposing the engine after forking the worker or
before each task ... but it remains unnecessary and wrong to initialize the
engine early when it isn't used, and then fork it.
If app and SqlAlchemy were initialized before launching celery, the forked
workers would inherit the database connection ... and that doesn't work.
This could be handled by disposing the engine after forking the worker or
before each task ... but it remains unnecessary and wrong to initialize the
engine early when it isn't used, and then fork it.
2 files changed with 5 insertions and 3 deletions:
0 comments (0 inline, 0 general)
First comment
0 comments (0 inline, 0 general)
First comment