Coverage for postrfp / jobs / internal / schemas.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.12.0, created at 2025-12-03 01:35 +0000

1from typing import Literal 

2 

3from pydantic import BaseModel 

4 

5 

6class JobStatusUpdate(BaseModel): 

7 """Result data sent from Dagu webhook DAG after delivery attempt. 

8 

9 Note: Fields accept both concrete values and Dagu template strings 

10 (e.g., "${EXECUTION_ID}") which are substituted at runtime. 

11 """ 

12 

13 status: str 

14 job_type: Literal["webhook_delivery", "datafeed_fetch"] 

15 response_body: str | None = None 

16 error_message: str | None = None 

17 execution_id: int | str # Allows int or template string like "${EXECUTION_ID}"