tasks@scheduler option

momotor.options.domain.scheduler.tasks.get_scheduler_tasks_option(recipe, config, step_id)

Get the ‘tasks’ option for a single step

This gets the value of the ‘tasks’ option in the ‘scheduler’ domain from the step, recipe or config.

A step supporting sub-tasks must define the option in the recipe. The option definition in the recipe declares what is supported. The format for the definition is as follows:

Tasks option

Recipe/config option allowed

*

Any dimensions allowed (e.g. 2, 2.2 etc)

?

A single dimension required (e.g. 1, 2)

?.?

Two dimensions required (e.g. 1.1, 2.2)

?.?.?

Three dimensions required (e.g. 1.2.3, 2.2.2)

?.*

At least two dimensions required (e.g. 1.2, 1.2.3)

4.?

Exactly two dimensions required, and the first must be 4 (e.g. 4.1, 4.2)

4.*

At least two dimensions required, and the first must be 4 (e.g. 4.1, 4.2.3)

4.4

A fixed dimension. Config option not required, but if provided, MUST equal 4.4

There is no limit to the number of dimensions allowed.

Values in the config take priority over values in the recipe. If the option in the recipe contains dimension wildcards ? or *, the option in the config must fill in those values.

Parameters
Return type

Optional[Tuple[int, …]]

Returns

the tasks option, parsed into a tuple of ints