mirror of
https://github.com/smittix/intercept.git
synced 2026-07-19 14:58:10 -07:00
fix: remove manual gevent monkey-patch that blocked gunicorn worker boot
Gunicorn's gevent worker (-k gevent) handles monkey-patching internally. The manual patch_all() in app.py ran in the master process before worker fork, preventing the worker from booting (no 'Booting worker' log line, server unreachable). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6,15 +6,6 @@ Flask application and shared state.
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import os as _os
|
|
||||||
if _os.environ.get('INTERCEPT_USE_GEVENT') == '1':
|
|
||||||
try:
|
|
||||||
from gevent import monkey as _monkey
|
|
||||||
_monkey.patch_all(subprocess=False)
|
|
||||||
except ImportError:
|
|
||||||
pass
|
|
||||||
del _os
|
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import site
|
import site
|
||||||
|
|
||||||
|
|||||||
@@ -123,8 +123,6 @@ if [[ "$HAS_GUNICORN" -eq 1 && "$HAS_GEVENT" -eq 1 ]]; then
|
|||||||
echo "[INTERCEPT] Starting production server (gunicorn + gevent)..."
|
echo "[INTERCEPT] Starting production server (gunicorn + gevent)..."
|
||||||
echo "[INTERCEPT] Listening on ${HOST}:${PORT}"
|
echo "[INTERCEPT] Listening on ${HOST}:${PORT}"
|
||||||
|
|
||||||
export INTERCEPT_USE_GEVENT=1
|
|
||||||
|
|
||||||
GUNICORN_ARGS=(
|
GUNICORN_ARGS=(
|
||||||
-k gevent
|
-k gevent
|
||||||
-w 1
|
-w 1
|
||||||
|
|||||||
Reference in New Issue
Block a user