mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-04 05:27:04 +08:00
handle case where request body is empty
This commit is contained in:
parent
88185aeb81
commit
42116a1f8a
13
server.py
13
server.py
@ -685,12 +685,13 @@ class PromptServer():
|
|||||||
|
|
||||||
@routes.post("/interrupt")
|
@routes.post("/interrupt")
|
||||||
async def post_interrupt(request):
|
async def post_interrupt(request):
|
||||||
json_data = await request.json()
|
if request.can_read_body:
|
||||||
if "id" in json_data:
|
json_data = await request.json()
|
||||||
current_queue = self.prompt_queue.get_current_queue_volatile()
|
if "id" in json_data:
|
||||||
queue_running = current_queue[0]
|
current_queue = self.prompt_queue.get_current_queue_volatile()
|
||||||
if len(queue_running) > 0 and queue_running[0][1] == json_data["id"]:
|
queue_running = current_queue[0]
|
||||||
nodes.interrupt_processing()
|
if len(queue_running) > 0 and queue_running[0][1] == json_data["id"]:
|
||||||
|
nodes.interrupt_processing()
|
||||||
else:
|
else:
|
||||||
nodes.interrupt_processing()
|
nodes.interrupt_processing()
|
||||||
return web.Response(status=200)
|
return web.Response(status=200)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user