logfile sanity check
This commit is contained in:
parent
4e6f976e1d
commit
48aff48740
|
@ -86,8 +86,11 @@ def upload_multidata():
|
||||||
|
|
||||||
|
|
||||||
def _read_log(path: str):
|
def _read_log(path: str):
|
||||||
with open(path) as log:
|
if os.path.exists(path):
|
||||||
yield from log
|
with open(path) as log:
|
||||||
|
yield from log
|
||||||
|
else:
|
||||||
|
yield "Logfile does not exist. Likely a crash during spinup of multiworld instance."
|
||||||
|
|
||||||
|
|
||||||
@app.route('/log/<filename>')
|
@app.route('/log/<filename>')
|
||||||
|
@ -140,8 +143,7 @@ def run_server_process(multidata: str):
|
||||||
if ".." not in sys.path:
|
if ".." not in sys.path:
|
||||||
sys.path.append("..")
|
sys.path.append("..")
|
||||||
from MultiServer import Context, server
|
from MultiServer import Context, server
|
||||||
loop = asyncio.get_event_loop()
|
asyncio.run(main())
|
||||||
loop.run_until_complete(main())
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Reference in New Issue