From cce3c8aebdebd79976426003cd4f67cef1fbb75b Mon Sep 17 00:00:00 2001 From: Hilary James Oliver Date: Thu, 5 Dec 2024 15:59:41 +1300 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com> --- cylc/flow/network/schema.py | 11 +++++++---- cylc/flow/scripts/trigger.py | 12 ++++++------ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/cylc/flow/network/schema.py b/cylc/flow/network/schema.py index e5394eecdc..d5f174e5b9 100644 --- a/cylc/flow/network/schema.py +++ b/cylc/flow/network/schema.py @@ -2215,10 +2215,13 @@ class Meta: description = sstrip(''' Manually trigger tasks, even in a paused workflow. - Triggering an unqueued task queues it, to run when queue-released. - Triggering a queued task runs it now regardless of queue limiting. - - The "on resume" option waits for a paused workflow to be resumed. + Triggering a task that is not yet queued will queue it. + + Triggering a queued task runs it immediately. + + Queues release tasks to run when their active task count + drops below the queue limit. So, depending on the task count, you + may need to trigger a task twice to make it run immediately. Valid for: paused, running workflows. ''') diff --git a/cylc/flow/scripts/trigger.py b/cylc/flow/scripts/trigger.py index ab3f8ba876..489a82adce 100755 --- a/cylc/flow/scripts/trigger.py +++ b/cylc/flow/scripts/trigger.py @@ -19,13 +19,13 @@ Force task(s) to run regardless of prerequisites, even in a paused workflow. -Triggering an unqueued task queues it, to run when released by the queue. -Triggering a queued task runs it immediately regardless of queue limiting. -So you may need to trigger tasks twice if queue limiting is in effect. +Triggering a task that is not yet queued will queue it. -If the workflow is paused queued waiting tasks will not run (unless manually -triggered) until the workflow is resumed, even if the queue empties out. This -includes tasks queued by manual triggering, when queue limits are in effect. +Triggering a queued task runs it immediately. + +Queues release tasks to run when their active task count drops below the queue +limit. So, depending on the task count, you may need to trigger a task twice to make +it run immediately. Attempts to trigger active tasks (submitted or running) will be ignored.