diff --git a/src/dashboard.py b/src/dashboard.py index 9ed6e06..66c124e 100644 --- a/src/dashboard.py +++ b/src/dashboard.py @@ -1838,7 +1838,7 @@ def gunicornConfig(): _, app_port = DashboardConfig.GetConfig("Server", "app_port") return app_ip, app_port -global sqldb, cursor, DashboardConfig, WireguardConfigurations, AllPeerJobs, JobLogger +# global sqldb, cursor, DashboardConfig, WireguardConfigurations, AllPeerJobs, JobLogger sqldb = sqlite3.connect(os.path.join(CONFIGURATION_PATH, 'db', 'wgdashboard.db'), check_same_thread=False) sqldb.row_factory = sqlite3.Row diff --git a/src/gunicorn.conf.py b/src/gunicorn.conf.py index a627725..de7f6a9 100644 --- a/src/gunicorn.conf.py +++ b/src/gunicorn.conf.py @@ -1,6 +1,7 @@ import multiprocessing import dashboard +global sqldb, cursor, DashboardConfig, WireguardConfigurations, AllPeerJobs, JobLogger app_host, app_port = dashboard.gunicornConfig() worker_class = 'gthread'