Improve logging and handling when websocket gets behind (#86854)

fixes undefined
This commit is contained in:
J. Nick Koston 2023-01-29 10:49:27 -10:00 committed by GitHub
parent c612a92cfb
commit 0f4b17755e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 127 additions and 36 deletions

View file

@ -21,9 +21,12 @@ AsyncWebSocketCommandHandler = Callable[
DOMAIN: Final = "websocket_api"
URL: Final = "/api/websocket"
PENDING_MSG_PEAK: Final = 512
PENDING_MSG_PEAK: Final = 1024
PENDING_MSG_PEAK_TIME: Final = 5
MAX_PENDING_MSG: Final = 2048
# Maximum number of messages that can be pending at any given time.
# This is effectively the upper limit of the number of entities
# that can fire state changes within ~1 second.
MAX_PENDING_MSG: Final = 4096
ERR_ID_REUSE: Final = "id_reuse"
ERR_INVALID_FORMAT: Final = "invalid_format"