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
Hey,
Basically I have set up SocketIO (gunicorn + eventlet) + Flask + Celery with Redis as message queue. Emitting from Celery worker works, but how to disconnect people from Celery?
After successful websocket connection and passing JWT authorization token as query param I cache SID to the Redis with JWT access expiration time. I want to disconnect people when expiration time is over, but it seems that Celery worker doesn't have any relationship with Flask/SocketIO server through the Redis (disconnect function).
In Celery task I retrieve SIDs from Redis that should be disconnected.
Is there any workaround for disconnect function?
@tropicoo the master branch on the python-socketio repo has this implemented. Could I ask you to install that from the github repo and give it a quick test? The addition is that the client manager object now has a disconnect() method.
Hey,
Basically I have set up SocketIO (gunicorn + eventlet) + Flask + Celery with Redis as message queue. Emitting from Celery worker works, but how to disconnect people from Celery?
After successful websocket connection and passing JWT authorization token as query param I cache SID to the Redis with JWT access expiration time. I want to disconnect people when expiration time is over, but it seems that Celery worker doesn't have any relationship with Flask/SocketIO server through the Redis (
disconnect
function).In Celery task I retrieve SIDs from Redis that should be disconnected.
Is there any workaround for
disconnect
function?This code should handle case when websocket connection is still alive even when the user auth is expired.
Thanks.
The text was updated successfully, but these errors were encountered: