From b36758b1de6e7609129359d7f48a92558834e22d Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 20 Jun 2023 14:33:22 +0300 Subject: Create new entry-point module to reduce chances of circular imports. This commit creates a new entry-point module (wqflask/gn2_main.py) and imports all the other modules that import the application object with something like: `from wqflask import app` This breaks the subtle circular-import cycle that tends to cause a lot of inconveniences when developing the application. --- wqflask/run_gunicorn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wqflask/run_gunicorn.py') diff --git a/wqflask/run_gunicorn.py b/wqflask/run_gunicorn.py index 03f310eb..af117466 100644 --- a/wqflask/run_gunicorn.py +++ b/wqflask/run_gunicorn.py @@ -9,7 +9,7 @@ print("===> Starting up Gunicorn process") -from wqflask import app +from gn2_main import app from utility.startup_config import app_config app_config() -- cgit v1.2.3