mirror of
https://github.com/frappe/gunicorn.git
synced 2026-07-01 10:11:30 +08:00
Closes #3484 When a client disconnects during an ASGI request, the worker now: 1. Sends http.disconnect message to the app's receive queue 2. Allows a configurable grace period for cleanup (default: 3 seconds) 3. Only cancels the task after the grace period expires This follows the ASGI HTTP Connection Scope spec which defines http.disconnect as the message apps should receive when clients disconnect: https://asgi.readthedocs.io/en/latest/specs/www.html#disconnect-receive-event The grace period prevents CancelledError from propagating to async database operations, allowing SQLAlchemy and other async DB libraries to properly reset their connection pools. New config option: --asgi-disconnect-grace-period (default: 3 seconds)
Generate Documentation
Requirements
Install the documentation dependencies with:
pip install -r requirements_dev.txt
This provides MkDocs with the Material theme and supporting plugins.
Build static HTML
mkdocs build
The rendered site is emitted into the site/ directory.
Preview locally
mkdocs serve
This serves the documentation at http://127.0.0.1:8000/ with live reload.