Skip to content

Commit

Permalink
update job status fields (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
seanconeys authored Jan 10, 2022
1 parent ec41c47 commit fb2e4be
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion redact/data_models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from enum import Enum
from httpx import Response
from pydantic import BaseModel, Field, PositiveInt
from pydantic import BaseModel, Field, PositiveInt, conint, confloat
from typing import Optional, List, Tuple
from uuid import UUID

Expand Down Expand Up @@ -64,6 +64,8 @@ class JobStatus(BaseModel):
start_timestamp: Optional[float] = None
end_timestamp: Optional[float] = None
estimated_time_to_completion: Optional[float] = None
progress: confloat(ge=0.0, le=1.0)
total_frames: conint(ge=1)
warnings: List[str] = Field(default_factory=list)

def is_running(self):
Expand Down

0 comments on commit fb2e4be

Please sign in to comment.