diff --git a/backend/api/jobs/jobs.py b/backend/api/jobs/jobs.py index 7d13f9a8..4b392ec8 100644 --- a/backend/api/jobs/jobs.py +++ b/backend/api/jobs/jobs.py @@ -66,7 +66,7 @@ class JobsRequestModel(ResponseModel): class JobsItemModel(RequestModel): id: int = Field(..., title="Job ID") status: JobState = Field(..., title="Job status") - progress: int = Field(..., title="Progress", examples=[24]) + progress: float = Field(..., title="Progress", examples=[24]) id_action: int = Field(..., title="Action ID", examples=[1]) id_service: int | None = Field(None, title="Service ID", examples=[3]) id_asset: int = Field(..., title="Asset ID") @@ -77,9 +77,9 @@ class JobsItemModel(RequestModel): ) priority: int = Field(3, title="Priority", examples=[3]) message: str = Field(..., title="Status description", examples=["Encoding 24%"]) - ctime: int | None = Field(None, title="Created at", examples=[TS_EXAMPLE]) - stime: int | None = Field(None, title="Started at", examples=[TS_EXAMPLE]) - etime: int | None = Field(None, title="Finished at", examples=[TS_EXAMPLE]) + ctime: float | None = Field(None, title="Created at", examples=[TS_EXAMPLE]) + stime: float | None = Field(None, title="Started at", examples=[TS_EXAMPLE]) + etime: float | None = Field(None, title="Finished at", examples=[TS_EXAMPLE]) asset_name: str | None = Field( None, title="Asset name", diff --git a/backend/nebula/config.py b/backend/nebula/config.py index 9db3f36c..a0564912 100644 --- a/backend/nebula/config.py +++ b/backend/nebula/config.py @@ -2,7 +2,7 @@ from typing import Literal import dotenv -from pydantic import BaseModel, Field, PostgresDsn, RedisDsn +from pydantic import BaseModel, Field class NebulaConfig(BaseModel): @@ -16,13 +16,13 @@ class NebulaConfig(BaseModel): description="Message of the day", ) - postgres: PostgresDsn = Field( - "postgres://nebula:nebula@postgres/nebula", # type: ignore + postgres: str = Field( + "postgres://nebula:nebula@postgres/nebula", description="PostgreSQL connection string", ) - redis: RedisDsn = Field( - "redis://redis", # type: ignore + redis: str = Field( + "redis://redis", description="Redis connection string", )