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("")
|
||||||
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')
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user