mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 00:09:24 +08:00
* Share durable turn status groups across application and stores * Verify durable status groups against SQLite active lookup
18 lines
553 B
Python
18 lines
553 B
Python
"""Durable turn statuses shared by the application and its stores."""
|
|
|
|
from enum import StrEnum
|
|
|
|
|
|
class TurnStatus(StrEnum):
|
|
QUEUED = "queued"
|
|
RUNNING = "running"
|
|
WAITING_INPUT = "waiting_input"
|
|
COMPLETED = "completed"
|
|
FAILED = "failed"
|
|
CANCELLED = "cancelled"
|
|
|
|
|
|
ACTIVE_TURN_STATUSES = frozenset({TurnStatus.QUEUED, TurnStatus.RUNNING, TurnStatus.WAITING_INPUT})
|
|
TERMINAL_TURN_STATUSES = frozenset({TurnStatus.COMPLETED, TurnStatus.FAILED, TurnStatus.CANCELLED})
|
|
ALL_TURN_STATUSES = ACTIVE_TURN_STATUSES | TERMINAL_TURN_STATUSES
|