From dfed112429d088d359ba4fcb43188e3baf45953b Mon Sep 17 00:00:00 2001 From: SeanChenTaipei Date: Fri, 3 Mar 2023 22:03:29 +0800 Subject: [PATCH] re --- Procfile | 2 +- main.py | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Procfile b/Procfile index dc46f1b..9ce81f5 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: gunicorn main:app \ No newline at end of file +web: gunicorn main:app --preload --workers 8 \ No newline at end of file diff --git a/main.py b/main.py index 0ad72ff..b756b0d 100644 --- a/main.py +++ b/main.py @@ -20,25 +20,25 @@ pd.options.plotting.backend = "plotly" # PARAMETERS CONFIGS = { - "ENV": "development", - "DEBUG": True, + # "ENV": "development", + # "DEBUG": True, "SECRET_KEY": os.urandom(30), # Set the secret key for session authentication "PERMANENT_SESSION_LIFETIME": timedelta(minutes=60) } -# SQL_CONFIG = dict( -# database= os.getenv("PGDATABASE"), -# user=os.getenv("PGUSER"), -# host=os.getenv("PGHOST"), -# port=os.getenv("PGPORT"), -# password=os.getenv("PGPASSWORD") -# ) SQL_CONFIG = dict( - database="railway", - user="postgres", - host="containers-us-west-103.railway.app", - port="5913", - password="gv5Mh7cPjCm9YTjAmsYD" + database= os.getenv("PGDATABASE"), + user=os.getenv("PGUSER"), + host=os.getenv("PGHOST"), + port=os.getenv("PGPORT"), + password=os.getenv("PGPASSWORD") ) +# SQL_CONFIG = dict( +# database="railway", +# user="postgres", +# host="containers-us-west-103.railway.app", +# port="5913", +# password="gv5Mh7cPjCm9YTjAmsYD" +# ) # SQL_CONFIG = { # 'database': "tpm", # 'user': "hsienchen",