mirror of
https://github.com/ansible/awx.git
synced 2026-04-10 12:39:22 -02:30
requeue websocket messages that don't (yet) have an established user
There's a race between our `ws_connect` and `ws_receive` methods; it's possible to fall into a scenario where we're handling a legitimate message *before* django-channels is able to persist the `user_id` into the channel session. This results in a scenario where a user can open a browser tab and never receive new websocket messages. In this scenario, we should just toss the message back into the queue and try again later (up to a reasonable limit of retries).
This commit is contained in:
@@ -866,6 +866,11 @@ TOWER_SETTINGS_MANIFEST = {}
|
||||
|
||||
LOG_AGGREGATOR_ENABLED = False
|
||||
|
||||
# The number of retry attempts for websocket session establishment
|
||||
# If you're encountering issues establishing websockets in clustered Tower,
|
||||
# raising this value can help
|
||||
CHANNEL_LAYER_RECEIVE_MAX_RETRY = 10
|
||||
|
||||
# Logging configuration.
|
||||
LOGGING = {
|
||||
'version': 1,
|
||||
|
||||
Reference in New Issue
Block a user