mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-14 07:22:36 +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)
|
self.sockets.pop(sid, None)
|
||||||
return ws
|
return ws
|
||||||
|
|
||||||
|
@routes.get("/reboot")
|
||||||
|
def restart(self):
|
||||||
|
return os.execv(sys.executable, ['python'] + sys.argv)
|
||||||
|
|
||||||
@routes.get("/")
|
@routes.get("/")
|
||||||
async def get_root(request):
|
async def get_root(request):
|
||||||
return web.FileResponse(os.path.join(self.web_root, "index.html"))
|
return web.FileResponse(os.path.join(self.web_root, "index.html"))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user