Skip to content

Commit

Permalink
refactor: move import of create_app to the appropriate section in app.py
Browse files Browse the repository at this point in the history
Signed-off-by: -LAN- <laipz8200@outlook.com>
  • Loading branch information
laipz8200 committed Dec 29, 2024
1 parent 4720485 commit d66a073
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ def is_db_command():

app = create_migrations_app()
else:
from app_factory import create_app

if not os.environ.get("DEBUG", False):
from gevent import monkey # type: ignore

Expand All @@ -27,6 +25,8 @@ def is_db_command():
# grpc gevent
grpc_gevent.init_gevent()

from app_factory import create_app

app = create_app()
celery = app.extensions["celery"]

Expand Down

0 comments on commit d66a073

Please sign in to comment.