From 5755d13460372c4e28e2ef72430fc7e7fe893d3d Mon Sep 17 00:00:00 2001 From: Donald Zou Date: Sun, 4 Aug 2024 19:45:28 -0400 Subject: [PATCH] Update gunicorn.conf.py --- src/gunicorn.conf.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gunicorn.conf.py b/src/gunicorn.conf.py index 0b106e6..f966f2e 100644 --- a/src/gunicorn.conf.py +++ b/src/gunicorn.conf.py @@ -1,8 +1,9 @@ -import multiprocessing import dashboard - +from datetime import datetime global sqldb, cursor, DashboardConfig, WireguardConfigurations, AllPeerJobs, JobLogger app_host, app_port = dashboard.gunicornConfig() +date = datetime.today().strftime('%Y_%m_%d_%H_%M_%S') + worker_class = 'gthread' workers = 1 @@ -11,7 +12,7 @@ bind = f"{app_host}:{app_port}" daemon = True pidfile = './gunicorn.pid' wsgi_app = "dashboard:app" -access_logfile = "./log/access.log" +access_logfile = f"./log/access_{date}.log" log_level = "debug" capture_output = True -error_logfile = "./log/error.log" \ No newline at end of file +error_logfile = f"./log/error_{date}.log"