Closed (fixed)
Project:
Maestro
Version:
4.2.5
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
26 Nov 2025 at 17:56 UTC
Updated:
11 Dec 2025 at 20:49 UTC
Jump to comment: Most recent
The run_once flag is used for interactive tasks to omit them from being executed by the orchestrator repeatedly.
For non-interactive tasks, we've generally set a flag within the queue to detect whether the execution of the task should be skipped.
Introduce a new API to get and set the Maestro suspension flag.
There needs to be a few new APIs:
getSuspensionFlag($queueID)
setSuspensionFlag($queueID, $suspension_flag = MAESTRO_SUSPEND)
and the base constants:
// Maestro suspension flags
const MAESTRO_UNSUSPENDED = 0;
const MAESTRO_SUSPEND = 1;
const MAESTRO_ALLOW_SUSPENDED_COMPLETION = 2;
Comments
Comment #4
_randy commentedAdded the new APIs and the Maestro module's constants.
Comment #7
_randy commentedComment #8
_randy commentedWe can augment the engine to eliminate the need for individual tasks to worry about suspension execution, however, tasks which are suspended and are resumed will re-execute.
But forcing the engine to look at the dynamic suspension flag we can determine whether to allow execution of the task or not.
If a task, regardless of type, has been set to
MAESTRO_SUSPENDwe skip execution in the engine altogether.When a task is set to anything other than
MAESTRO_SUSPENDwe can execute the task.It will be up to the task implementation to detect whether or not to re-run the entire execute() method's logic once unsuspended.
Comment #10
_randy commentedThe following APIs have been added:
getQueueItemTaskData
setQueueItemTaskData
setSuspensionFlag
getSuspensionFlag
A suspended task which uses the SetSuspensionFlag API will have its task status appear as "On hold" and the suspension flag in the task_data set.
The separation of task status AND suspension flag in the task_data allows for developers to suspend tasks in an absolute fashion (as done with the API) or suspend the task manually and still allow for processing based on the MAESTRO_ALLOW_SUSPENDED_COMPLETION suspension flag.