fix: DB creation v2
This commit is contained in:
parent
88b1ea53f5
commit
083796b035
1
db.py
1
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)
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user