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()
|
cursor.close()
|
||||||
connection.close()
|
connection.close()
|
||||||
|
print("Checked tables")
|
||||||
|
|
||||||
def add_user(email,domain,password,token):
|
def add_user(email,domain,password,token):
|
||||||
connection = mysql.connector.connect(**dbargs)
|
connection = mysql.connector.connect(**dbargs)
|
||||||
|
@ -7,6 +7,7 @@ import os
|
|||||||
import dotenv
|
import dotenv
|
||||||
import sys
|
import sys
|
||||||
import json
|
import json
|
||||||
|
import db
|
||||||
|
|
||||||
|
|
||||||
class GunicornApp(BaseApplication):
|
class GunicornApp(BaseApplication):
|
||||||
@ -24,6 +25,7 @@ class GunicornApp(BaseApplication):
|
|||||||
return self.application
|
return self.application
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
db.check_tables()
|
||||||
workers = os.getenv('WORKERS')
|
workers = os.getenv('WORKERS')
|
||||||
threads = os.getenv('THREADS')
|
threads = os.getenv('THREADS')
|
||||||
if workers is None:
|
if workers is None:
|
||||||
|
Loading…
Reference in New Issue
Block a user