Coverage for backend/common/src/common/models/general.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.10.7, created at 2026-05-13 02:47 +0000

1from pydantic import BaseModel, Field 

2from common.models import CloudEventsPayload 

3 

4 

5class TaskPayload(BaseModel): 

6 """Minimal task identifier payload used on cancellation/running topics.""" 

7 

8 task_id: int 

9 timed_out: bool = Field( 

10 default=False, 

11 description=( 

12 "True when cancellation was triggered by solve timeout expiry " 

13 "rather than an explicit user cancel request." 

14 ), 

15 ) 

16 

17TaskEvent = CloudEventsPayload[TaskPayload]