Files
dify/api/celery_entrypoint.py
T
672a627fa5 ci: enable Ruff E402 (#44123)
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-10-19 01:16:16 +00:00

15 lines
406 B
Python

import psycogreen.gevent as pscycogreen_gevent
from grpc.experimental import gevent as grpc_gevent
# grpc gevent
grpc_gevent.init_gevent()
print("gRPC patched with gevent.", flush=True) # noqa: T201
pscycogreen_gevent.patch_psycopg()
print("psycopg2 patched with gevent.", flush=True) # noqa: T201
# Import after gevent patching.
from app import app, celery # noqa: E402
__all__ = ["app", "celery"]