SocketIO emit from Asynchronous Celery worker is not working SocketIO emit from Asynchronous Celery worker is not working flask flask

SocketIO emit from Asynchronous Celery worker is not working


Did you forget adding the message_queue ?

socketio.init_app(app, message_queue='redis://localhost:6379/0')


You can run Celery in multiprocessing or eventlet mode.

By default, Celery uses multiprocessing to set up a new process for a new worker. Eventlet uses threads, which I believe is what you want to use in this scenario since you want shared memory.

You may find this documentation useful.