fix: Support configuring via envvar

This commit is contained in:
Ankush Menat 2026-05-28 16:37:55 +05:30
parent c24711b795
commit c20f3a3784

View File

@ -751,10 +751,14 @@ class EnableAdaptiveQueueing(Setting):
validator = validate_bool
action = "store_true"
type = bool
default = False
default = validate_bool(
os.environ.get("GUNICORN_ENABLE_ADAPTIVE_QUEUEING", "false"))
desc = """\
Enable adaptive multi-queue routing in the ``gthread`` worker.
Can also be enabled by setting the ``GUNICORN_ENABLE_ADAPTIVE_QUEUEING``
environment variable to ``true``.
When enabled, the worker splits its :ref:`threads` roughly evenly into
two lanes a *fast* lane and a *slow* lane and routes each request
to one of them by predicting, from previously observed timings of the