Added workflow history

Moved socket output updates to all node executions
Made image rendering on nodes more generic
This commit is contained in:
pythongosssss
2023-02-23 20:12:57 +00:00
committed by GitHub
parent 2816eb236d
commit 9bd7bfa648
4 changed files with 143 additions and 117 deletions

View File

@@ -77,6 +77,10 @@ class PromptServer():
out[x] = info
return web.json_response(out)
@routes.get("/history")
async def get_history(request):
return web.json_response(self.prompt_queue.history)
@routes.get("/queue")
async def get_queue(request):
queue_info = {}
@@ -133,6 +137,19 @@ class PromptServer():
self.prompt_queue.delete_queue_item(delete_func)
return web.Response(status=200)
@routes.post("/history")
async def post_history(request):
json_data = await request.json()
if "clear" in json_data:
if json_data["clear"]:
self.prompt_queue.history = {}
if "delete" in json_data:
to_delete = json_data['delete']
for id_to_delete in to_delete:
self.prompt_queue.history.pop(id_to_delete, None)
return web.Response(status=200)
self.app.add_routes(routes)
self.app.add_routes([