-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Users often want to run plans or sequences of plans they have run before. For example, they might have a series of plans that are always run as a survey of a sample, or to look at a particular feature etc.
If the plans are run often enough you could make a new plan containing them and then add that to the RE environment. For example:
def survey_scan():
yield from xas(....
yield from xas(.....
yield from change_edge(...
yield from xps(.....
yield from xps(.....
However this involves some programming. You also loose the ability to reorder or modify the plans within this plan survey_scan.
If instead it was possible to define and store named lists of plans which could be restored to the queue, then users of graphical interfaces to the queuserver could create their favorite series of plans by submitting things to the queue and then name them to be searched and restored later.
I think we could add the following commands to the re_manager_api.
| method | batch_database_item_add |
|---|---|
| description | Adds a named batch of plans to a redis database |
| parameters | items: list, the list containing a batch of items. Each element is a dictionary containing valid set of item parameters (see instructions for queue_item_add API). An empty item list will also be accepted. name:str, the name to give this batch. Must be unique user_group: str, the name of the user group (e.g. ‘primary’). user: str,the name of the user (e.g. ‘Default User’). The name is included in the item metadata and may be used to identify the user who added the item to the database. |
| returns | success: boolean, successful if added. Fails if there is already a batch with this name in the database |
| execution | immediate |
| method | batch_database_item_remove |
|---|---|
| description | removes a named batch of plans from redis database |
| parameters | name:str, the name to give this batch. Must be unique |
| returns | success: boolean, successful if removed. Fails if no batch exists with this name |
| execution | immediate |
| method | batch_database_item_rename |
|---|---|
| description | renames a named batch of plans stored on a redis database |
| parameters | old_name:str, the name to replace name:str, the name to give this batch. Must be unique user_group: str, the name of the user group (e.g. ‘primary’). user: str,the name of the user (e.g. ‘Default User’). The name is included in the item metadata and may be used to identify the user who named the item. |
| returns | success: boolean, successful if added. Fails if there is already a batch with this name in the database |
| execution | immediate |
| method | batch_database_clear |
|---|---|
| description | removes all items in the database of batches of plans |
| parameters | |
| returns | success: boolean, successful if cleared. Fails if ? |
| execution | immediate |
| method | batch_database_batches |
|---|---|
| description | returns a dict containing keys which are the batch names and entries which are lists containing batches of items. |
| parameters | |
| returns | success: boolean, successful if received batches: dict of lists where each element in the list is a dictionary containing valid set of item parameters (see instructions for queue_item_add API). |
| execution | immediate |
This problem could be addressed a number of different ways, but I think putting it on the queueserver is beneficial because multiple clients might want to access what a particular user has submitted. Additionally if the client application stops, the lists of plans is not lost.