ENH: implementation of an option to add 'queue_stop' instructions to the plan queue #93
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The code that implements an option to add
queue_stop
instructions to the plan queue. Once the instruction is encountered during plan execution, the queue execution is stopped. Execution may be resumed by sendingqueue_start
request to the manager. The instructions are treated similarly to plans: they can be added to the queue, removed from the queue or moved within the queue. Instructions are assignedplan_uid
and can be accessed by position and UID (the same way as plans).Currently an instruction can be added to the queue by sending
instead of
"plan": {...}
as an argument ofqueue_plan_add
. The option of adding instructions is not yet implemented in CLI tool.The option of adding instructions to the queue makes current naming (e.g.
queue_plan_add
,queue_plan_remove
,plan_uid
) misleading. It may be a good idea to rename the API that are used to request operations on the queue and data fields reporting the state of the queue to use the worditem
instead ofplan
(e.g.queue_item_add
,queue_item_remove
,item_uid
).