Until now EventBroadcaster wasn't raising an error if listening Broadcaster channel failed to connect.
Now that it does (see related fix in fastapi_websocket_pubsub), we should also detect it in the BasePolicyWatcherTask and end that long lived task so the opal-server worker process closes and restarts (rather than remaining in a static erroneous limbo state)
A more fancy implementation would be retrying the failed connection (to avoid unnecessarily restarting the worker), but that could be later improved.
This is blocked by merging that PR - https://github.com/permitio/fastapi_websocket_pubsub/pull/77 And releasing
fastapi_websocket_pubsub
0.3.8Until now
EventBroadcaster
wasn't raising an error if listeningBroadcaster
channel failed to connect. Now that it does (see related fix infastapi_websocket_pubsub
), we should also detect it in theBasePolicyWatcherTask
and end that long lived task so the opal-server worker process closes and restarts (rather than remaining in a static erroneous limbo state)A more fancy implementation would be retrying the failed connection (to avoid unnecessarily restarting the worker), but that could be later improved.