mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-11 05:52:33 +08:00
Added API route for server reboot.
This commit is contained in:
parent
9906e3efe3
commit
f4ff481734
@ -120,6 +120,10 @@ class PromptServer():
|
||||
self.sockets.pop(sid, None)
|
||||
return ws
|
||||
|
||||
@routes.get("/reboot")
|
||||
def restart(self):
|
||||
return os.execv(sys.executable, ['python'] + sys.argv)
|
||||
|
||||
@routes.get("/")
|
||||
async def get_root(request):
|
||||
return web.FileResponse(os.path.join(self.web_root, "index.html"))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user