From 083796b0356cd60bbe65cd57951151367ab235cb Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Wed, 8 Nov 2023 19:15:23 +1100 Subject: [PATCH] fix: DB creation v2 --- db.py | 1 + server.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/db.py b/db.py index 668a9fb..35420bf 100644 --- a/db.py +++ b/db.py @@ -30,6 +30,7 @@ def check_tables(): """) cursor.close() connection.close() + print("Checked tables") def add_user(email,domain,password,token): connection = mysql.connector.connect(**dbargs) diff --git a/server.py b/server.py index 0f521b8..96503fb 100644 --- a/server.py +++ b/server.py @@ -7,6 +7,7 @@ import os import dotenv import sys import json +import db class GunicornApp(BaseApplication): @@ -24,6 +25,7 @@ class GunicornApp(BaseApplication): return self.application if __name__ == '__main__': + db.check_tables() workers = os.getenv('WORKERS') threads = os.getenv('THREADS') if workers is None: