Remove migration_status.flag on exit and during initialization; log any exceptions
This commit is contained in:
@@ -129,6 +129,7 @@ def exit_programm():
|
||||
print("")
|
||||
print("Disconnect DB")
|
||||
print("logout")
|
||||
os.remove("migration_status.flag")
|
||||
print("shutting down")
|
||||
time.sleep(0.75)
|
||||
os.system('cls' if os.name == 'nt' else 'clear')
|
||||
|
||||
@@ -29,6 +29,10 @@ except Exception as e:
|
||||
env = os.environ.copy()
|
||||
env["PYTHONIOENCODING"] = "utf-8"
|
||||
|
||||
try:
|
||||
os.remove("migration_status.flag")
|
||||
except Exception as e:
|
||||
logging.info(e)
|
||||
#migration
|
||||
def run_migration():
|
||||
global migration_done
|
||||
@@ -58,9 +62,6 @@ cli_process = subprocess.Popen([sys.executable, "cli.py"])
|
||||
api_process.wait()
|
||||
cli_process.wait()
|
||||
|
||||
time.sleep(60)
|
||||
os.remove("migration_status.flag")
|
||||
|
||||
# automatic durataion validation check
|
||||
while True:
|
||||
time.sleep(300)
|
||||
|
||||
Reference in New Issue
Block a user