mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
logfile sanity check
This commit is contained in:
@@ -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__":
|
||||||
|
|||||||
Reference in New Issue
Block a user