Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: implementation of an option to add 'queue_stop' instructions to the plan queue #93

Merged
merged 2 commits into from
Nov 25, 2020

Conversation

dmgav
Copy link
Contributor

@dmgav dmgav commented Nov 24, 2020

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 sending queue_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 assigned plan_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

"instruction": {"action": "queue_stop"}

instead of "plan": {...} as an argument of queue_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 word item instead of plan (e.g. queue_item_add, queue_item_remove, item_uid).

Copy link
Member

@mrakitin mrakitin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a good addition, I see no issues with it.

@dmgav
Copy link
Contributor Author

dmgav commented Nov 25, 2020

Thanks @mrakitin. I'll start working on renaming things.

@dmgav dmgav merged commit 20e2273 into bluesky:main Nov 25, 2020
@dmgav dmgav deleted the pause_instruction branch December 2, 2020 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants