Continue Flask migration.

This commit is contained in:
yohan 2024-06-02 09:34:33 +02:00
parent 29d1bb35c1
commit 3e32a488cb

View File

@ -132,6 +132,19 @@ with app.app_context():
db.create_all() db.create_all()
migrate = Migrate(app, db, compare_type=True) migrate = Migrate(app, db, compare_type=True)
start_time = time.time()
last_control_time = None
new_forced_mode = None
target_name = default_target
first_loop = True
# TODO: Get Linky overload warning
#cursor.execute("SELECT * FROM set_mode")
#rows = cursor.fetchall()
#for row in rows:
# print(row)
#sys.stdout.flush()
#import subprocess #import subprocess
#import time #import time
@ -284,20 +297,7 @@ migrate = Migrate(app, db, compare_type=True)
# def run(self): # def run(self):
# httpd.serve_forever() # httpd.serve_forever()
# #
#start_time = time.time()
#last_control_time = None
#new_forced_mode = None
#target_name = default_target
#first_loop = True
#
## TODO: Get Linky overload warning
#
##cursor.execute("SELECT * FROM set_mode")
##rows = cursor.fetchall()
##for row in rows:
## print(row)
##sys.stdout.flush()
#
#httpd = socketserver.TCPServer(("", http_port), MyHandler, bind_and_activate=False) #httpd = socketserver.TCPServer(("", http_port), MyHandler, bind_and_activate=False)
#httpd.allow_reuse_address = True #httpd.allow_reuse_address = True
#httpd.server_bind() #httpd.server_bind()