On start wait the clean of the logs to avoid old logs on first requests
This commit is contained in:
parent
18fb9d4cef
commit
2c3a05a056
1 changed files with 3 additions and 0 deletions
|
@ -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")
|
||||||
|
|
Loading…
Reference in a new issue