Added parameters to Socket.IO web server (#659)

This commit is contained in:
LouisFaure 2023-03-11 03:50:28 +07:00 committed by GitHub
parent 226543694b
commit ea5ef8ecb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -89,6 +89,8 @@ class App(Base):
cors_allowed_origins=cors_allowed_origins,
cors_credentials=config.cors_credentials,
max_http_buffer_size=config.polling_max_http_buffer_size,
ping_interval=constants.PING_INTERVAL,
ping_timeout=constants.PING_TIMEOUT,
)
# Create the socket app. Note event endpoint constant replaces the default 'socket.io' path.

View File

@ -80,6 +80,9 @@ TIMEOUT = 120
# The command to run the backend in production mode.
RUN_BACKEND_PROD = f"gunicorn --worker-class uvicorn.workers.UvicornH11Worker --preload --timeout {TIMEOUT} --log-level critical".split()
RUN_BACKEND_PROD_WINDOWS = f"uvicorn --timeout-keep-alive {TIMEOUT}".split()
# Socket.IO web server
PING_INTERVAL = 25
PING_TIMEOUT = 5
# Compiler variables.
# The extension for compiled Javascript files.