You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Signals : celeryd_after_setup called with sender but not worker_process_init #1972
i am facing a usecase where knowing the sender (or worker_pool_name) from which a process is started is needed to decide how the worker_process is initialized. Some workers are responsible for database I/O and need to know a global db_connection variable while others are only working with local information. Right now it is only possible to setup one prozess-initialization for all worker pools...
Activity
ask commentedon Apr 16, 2014
I don't know, I cannot think of any obvious reason why the sender should be the hostname, it could just as easily be the pid, or the app.
Most likely the reason is that the hostname was not even available at the time when the signal was introduced in 2.0:
https://github.com/celery/celery/blob/2.0-archived/celery/worker/__init__.py#L34-L55
FabianEnvoy commentedon Jul 26, 2017
Hi,
i am facing a usecase where knowing the sender (or worker_pool_name) from which a process is started is needed to decide how the worker_process is initialized. Some workers are responsible for database I/O and need to know a global db_connection variable while others are only working with local information. Right now it is only possible to setup one prozess-initialization for all worker pools...
or am I missing a feature/function?
best regards
Fabian