fix webhost pathing on linux
This commit is contained in:
parent
48aff48740
commit
a5bb3e3f59
|
@ -105,10 +105,9 @@ processstartlock = threading.Lock()
|
||||||
@app.route('/hosted/<filename>')
|
@app.route('/hosted/<filename>')
|
||||||
def host_multidata(filename: str):
|
def host_multidata(filename: str):
|
||||||
with db_session:
|
with db_session:
|
||||||
multidata = os.path.join(multidata_folder, filename)
|
multiworld = multiworlds.get(filename, None)
|
||||||
multiworld = multiworlds.get(multidata, None)
|
|
||||||
if not multiworld:
|
if not multiworld:
|
||||||
multiworld = Multiworld(multidata)
|
multiworld = Multiworld(filename)
|
||||||
|
|
||||||
with processstartlock:
|
with processstartlock:
|
||||||
multiworld.start()
|
multiworld.start()
|
||||||
|
@ -120,11 +119,11 @@ def run_server_process(multidata: str):
|
||||||
async def main():
|
async def main():
|
||||||
logging.basicConfig(format='[%(asctime)s] %(message)s',
|
logging.basicConfig(format='[%(asctime)s] %(message)s',
|
||||||
level=logging.INFO,
|
level=logging.INFO,
|
||||||
filename=os.path.join(LOGS_FOLDER, os.path.split(multidata)[-1] + ".txt"))
|
filename=os.path.join(LOGS_FOLDER, multidata + ".txt"))
|
||||||
|
|
||||||
ctx = Context("", 0, "", 1, 1000,
|
ctx = Context("", 0, "", 1, 1000,
|
||||||
True, "enabled", "goal")
|
True, "enabled", "goal")
|
||||||
ctx.load(multidata, True)
|
ctx.load(os.path.join(multidata_folder, multidata), True)
|
||||||
ctx.auto_shutdown = 24 * 60 * 60 # 24 hours
|
ctx.auto_shutdown = 24 * 60 * 60 # 24 hours
|
||||||
ctx.init_save()
|
ctx.init_save()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue