On start wait the clean of the logs to avoid old logs on first requests

This commit is contained in:
Ethanell 2019-10-27 21:40:47 +01:00
parent 18fb9d4cef
commit 2c3a05a056

View file

@ -78,6 +78,9 @@ def start():
while server.isalive(): while server.isalive():
sleep(1) sleep(1)
start() # Start again the server start() # Start again the server
# Wait the log file to be archived
while open(Path(conf["Path"])/"logs"/"latest.log", "r").read() != "":
sleep(1)
return "Ok" return "Ok"
else: else:
abort(400, "Server is running") abort(400, "Server is running")