server.web.schemas.task_concurrency

Pydantic schemas for Task Concurrency Timeline endpoints.

Classes

TaskConcurrencyResponse

Response model for task concurrency timeline.

TaskStatusAuditRecord

A single task status audit record.

TaskStatusAuditResponse

Response model for task status audit records.

WorkflowTaskTemplatesResponse

Response model for workflow task templates list.

TemplateTimelineRow

One row in the timeline — a single task template's event series.

TemplateTimelineResponse

Response for template execution timeline.

Module Contents

class server.web.schemas.task_concurrency.TaskConcurrencyResponse

Bases: pydantic.BaseModel

Response model for task concurrency timeline.

Contains time-bucketed concurrent task counts grouped by status, with optional template breakdown for hover details.

buckets: List[str]
series: Dict[str, List[int]]
template_breakdown: Dict[str, List[Dict[str, int]]] | None
class server.web.schemas.task_concurrency.TaskStatusAuditRecord

Bases: pydantic.BaseModel

A single task status audit record.

task_id: int
previous_status: str | None = None
new_status: str
entered_at: str | None = None
exited_at: str | None = None
class server.web.schemas.task_concurrency.TaskStatusAuditResponse

Bases: pydantic.BaseModel

Response model for task status audit records.

audit_records: List[TaskStatusAuditRecord]
class server.web.schemas.task_concurrency.WorkflowTaskTemplatesResponse

Bases: pydantic.BaseModel

Response model for workflow task templates list.

task_templates: List[str]
class server.web.schemas.task_concurrency.TemplateTimelineRow

Bases: pydantic.BaseModel

One row in the timeline — a single task template’s event series.

Each entry in timestamps marks an actual status transition; the corresponding index in each series list gives the number of tasks in that status immediately after the transition.

template_name: str
total_tasks: int
timestamps: List[str]
series: Dict[str, List[int]]
class server.web.schemas.task_concurrency.TemplateTimelineResponse

Bases: pydantic.BaseModel

Response for template execution timeline.

Each template carries its own timestamps array (the moments where any task in the template changed status) together with per-status counts, suitable for rendering as a continuous stacked area chart.

templates: List[TemplateTimelineRow]