File size: 1,010 Bytes
2ade2c6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
"""Task registry for the SupportDesk environment (per-task modules)."""

from tasks.base import (
    ALL_ISSUE_TYPES,
    ALL_PRIORITIES,
    ALL_QUEUES,
    ALL_STATUSES,
    SupportTaskSpec,
)
from tasks.billing_refund_easy import TASK as BILLING_REFUND_EASY
from tasks.account_takeover_medium import TASK as ACCOUNT_TAKEOVER_MEDIUM
from tasks.api_incident_hard import TASK as API_INCIDENT_HARD
from tasks.regulated_export_exception_hard import TASK as REGULATED_EXPORT_EXCEPTION_HARD

TASKS: dict[str, SupportTaskSpec] = {
    t.task_id: t
    for t in (
        BILLING_REFUND_EASY,
        ACCOUNT_TAKEOVER_MEDIUM,
        API_INCIDENT_HARD,
        REGULATED_EXPORT_EXCEPTION_HARD,
    )
}


def get_task(task_id: str) -> SupportTaskSpec:
    return TASKS[task_id]


def list_task_ids() -> list[str]:
    return list(TASKS.keys())


__all__ = [
    "SupportTaskSpec",
    "ALL_QUEUES",
    "ALL_PRIORITIES",
    "ALL_STATUSES",
    "ALL_ISSUE_TYPES",
    "TASKS",
    "get_task",
    "list_task_ids",
]