- Difficulty level: easy
- Time need to lean: 10 minutes or less
- Key points:
- Use task option
tag
to give additional information to tasks
- Use task option
Every task is associated with one or more tags, which are simply strings assigned to the task. Tasks can be identified by their unique IDs, or by their tags with option --tags
from commands such as sos status
, sos kill
, and sos purge
.
By default, a task is tagged by step name and workflow ID. For example, three tasks are generated from the following workflow, all the tasks have a tag c43ef3b6fcb97752
; the task from step 10
has a tag 10
, and two tasks from step 20
have tag 20
.
The tags can be used to identify a group of tasks. For example, the following magic (and equivalently command sos status --tags 20
) displays all tasks from step 20
.
Option tags
adds additional tags to each task. A tag can contain alphabetic and numeric characters, dash (-
), underscore (_
), and dot (.
). Tags of other types will be converted to string, and tags with other characters will still be accepted but with non-comforming characters removed.
For example, in the following workflow, by adding _input
as a task tag, it becomes much easier to identify the input file that each task is handling.