Remove migration_status.flag on exit and during initialization; log any exceptions

This commit is contained in:
Mabe
2026-09-23 20:53:42 -07:00
parent 12485792d2
commit 98e9b28bae
2 changed files with 5 additions and 3 deletions
+1
View File
@@ -129,6 +129,7 @@ def exit_programm():
print("") print("")
print("Disconnect DB") print("Disconnect DB")
print("logout") print("logout")
os.remove("migration_status.flag")
print("shutting down") print("shutting down")
time.sleep(0.75) time.sleep(0.75)
os.system('cls' if os.name == 'nt' else 'clear') os.system('cls' if os.name == 'nt' else 'clear')
+4 -3
View File
@@ -29,6 +29,10 @@ except Exception as e:
env = os.environ.copy() env = os.environ.copy()
env["PYTHONIOENCODING"] = "utf-8" env["PYTHONIOENCODING"] = "utf-8"
try:
os.remove("migration_status.flag")
except Exception as e:
logging.info(e)
#migration #migration
def run_migration(): def run_migration():
global migration_done global migration_done
@@ -58,9 +62,6 @@ cli_process = subprocess.Popen([sys.executable, "cli.py"])
api_process.wait() api_process.wait()
cli_process.wait() cli_process.wait()
time.sleep(60)
os.remove("migration_status.flag")
# automatic durataion validation check # automatic durataion validation check
while True: while True:
time.sleep(300) time.sleep(300)