_aux_task_group_disambiguation
| FUNCTION | DESCRIPTION |
|---|---|
get_task_group_owner_email |
Find and return the user's email associated to a TaskGroupV2 instance. |
remove_duplicate_task_groups |
Extract an item for each |
serialize_task_group |
Serialize a TaskGroupV2 (including its tasks) into a dict. |
Attributes
Classes
Functions:
_disambiguate_task_groups(*, matching_task_groups, user_id, default_group_id, db)
async
Find ownership-based top-priority task group, if any.
| PARAMETER | DESCRIPTION |
|---|---|
|
TYPE:
|
|
TYPE:
|
|
TYPE:
|
|
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
TaskGroupV2 | None
|
The task group or |
Source code in fractal_server/app/routes/api/v2/_aux_task_group_disambiguation.py
_disambiguate_task_groups_not_none(*, matching_task_groups, user_id, default_group_id, db)
async
Find ownership-based top-priority task group, and fail otherwise.
| PARAMETER | DESCRIPTION |
|---|---|
|
TYPE:
|
|
TYPE:
|
|
TYPE:
|
|
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
TaskGroupV2
|
The top-priority task group. |
Source code in fractal_server/app/routes/api/v2/_aux_task_group_disambiguation.py
get_task_group_owner_email(*, task_group, db)
async
Find and return the user's email associated to a TaskGroupV2 instance.
Source code in fractal_server/app/routes/api/v2/_aux_task_group_disambiguation.py
remove_duplicate_task_groups(*, task_groups, user_id, default_group_id, db)
async
Extract an item for each version from a sorted task-group list.
| PARAMETER | DESCRIPTION |
|---|---|
|
A list of task groups with identical
TYPE:
|
|
User ID
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[TaskGroupV2]
|
New list of task groups with no duplicate |
Source code in fractal_server/app/routes/api/v2/_aux_task_group_disambiguation.py
serialize_task_group(*, task_group, user_email=None, in_use=None)
Serialize a TaskGroupV2 (including its tasks) into a dict.
Optionally include user_email and in_use if provided.