MapAnnotation
Annotation map: task_name = > attributes.
Attributes
| Attribute | Type | Description |
|---|---|---|
| task_name | dict | A mapping of task names to their corresponding attribute dictionaries used for task-specific metadata. |
Methods
annotate_any()
@classmethod
def annotate_any() - > dict
Retrieves the default annotation attributes applicable to any task.
Returns
| Type | Description |
|---|---|
dict | A dictionary of attributes associated with the wildcard key, or None if no global annotations exist |
annotate()
@classmethod
def annotate(
task: [Task](../../events/state/task.md?sid=celery_events_state_task)
) - > dict
Fetches the specific annotation attributes associated with a given task's name.
Parameters
| Name | Type | Description |
|---|---|---|
| task | [Task](../../events/state/task.md?sid=celery_events_state_task) | The task object whose name is used as the lookup key in the annotation map |
Returns
| Type | Description |
|---|---|
dict | A dictionary of attributes mapped to the task name, or None if the task is not explicitly annotated |