Skip to content

Commit

Permalink
feat: integrate psycogreen for gevent compatibility in PostgreSQL (#1…
Browse files Browse the repository at this point in the history
…2253)

Signed-off-by: -LAN- <laipz8200@outlook.com>
  • Loading branch information
laipz8200 authored Dec 31, 2024
1 parent 634b382 commit 63a0b8b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 44 deletions.
4 changes: 4 additions & 0 deletions api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ def is_db_command():
# grpc gevent
grpc_gevent.init_gevent()

import psycogreen.gevent # type: ignore

psycogreen.gevent.patch_psycopg()

from app_factory import create_app

app = create_app()
Expand Down
56 changes: 12 additions & 44 deletions api/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions api/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ openai = "~1.52.0"
openpyxl = "~3.1.5"
pandas = { version = "~2.2.2", extras = ["performance", "excel"] }
pandas-stubs = "~2.2.3.241009"
psycogreen = "~1.0.2"
psycopg2-binary = "~2.9.6"
pycryptodome = "3.19.1"
pydantic = "~2.9.2"
Expand Down

0 comments on commit 63a0b8b

Please sign in to comment.