Skip to content

Commit

Permalink
reorder functions
Browse files Browse the repository at this point in the history
  • Loading branch information
PladsElsker committed Aug 11, 2023
1 parent 118290f commit d01d5e2
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions lib_comfyui/comfyui/queue_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,6 @@ def setup_tracker_id():
PromptQueueTracker.done_event.clear()


@ipc.run_in_process('comfyui')
def wait_until_put():
was_put = PromptQueueTracker.put_event.wait(timeout=3)
if not was_put:
PromptQueueTracker.tracked_id = PromptQueueTracker.original_id
return False

if not tracked_id_present():
return False

return True


@ipc.restrict_to_process('webui')
def wait_until_done():
if not wait_until_put():
Expand All @@ -106,6 +93,19 @@ def wait_until_done():
return False


@ipc.run_in_process('comfyui')
def wait_until_put():
was_put = PromptQueueTracker.put_event.wait(timeout=3)
if not was_put:
PromptQueueTracker.tracked_id = PromptQueueTracker.original_id
return False

if not tracked_id_present():
return False

return True


@ipc.run_in_process('comfyui')
def cancel_queued_workflow():
with PromptQueueTracker.queue_instance.mutex:
Expand Down

0 comments on commit d01d5e2

Please sign in to comment.