refactor: clean up commented-out code in upload completion logic

This commit is contained in:
KarrixLee
2025-04-28 16:29:59 +09:00
parent fbb89c9fb9
commit f3ddbd3d4d
+14 -14
View File
@@ -1403,20 +1403,20 @@ async def send_json_override(self, event, data, sid=None):
# We will now rely on the UploadQueue worker to set the final SUCCESS status
# after all uploads are confirmed complete.
# if not have_pending_upload(prompt_id):
# await update_run(prompt_id, Status.SUCCESS) # <-- REMOVE/COMMENT OUT
# if prompt_id in prompt_metadata: # <-- REMOVE/COMMENT OUT THIS BLOCK
# current_time = time.perf_counter()
# if prompt_metadata[prompt_id].start_time is not None:
# elapsed_time = current_time - prompt_metadata[prompt_id].start_time
# logger.info(f"Elapsed time: {elapsed_time} seconds")
# asyncio.create_task(
# send(
# "elapsed_time",
# {"prompt_id": prompt_id, "elapsed_time": elapsed_time},
# sid=sid,
# )
# )
if not have_pending_upload(prompt_id):
# await update_run(prompt_id, Status.SUCCESS) # <-- REMOVE/COMMENT OUT
if prompt_id in prompt_metadata: # <-- REMOVE/COMMENT OUT THIS BLOCK
current_time = time.perf_counter()
if prompt_metadata[prompt_id].start_time is not None:
elapsed_time = current_time - prompt_metadata[prompt_id].start_time
logger.info(f"Elapsed time: {elapsed_time} seconds")
asyncio.create_task(
send(
"elapsed_time",
{"prompt_id": prompt_id, "elapsed_time": elapsed_time},
sid=sid,
)
)
if event == "executing" and data.get("node") is not None:
node = data.get("node")