Skip to content

Commit

Permalink
hotfix: pydantic validation
Browse files Browse the repository at this point in the history
  • Loading branch information
martastain committed Mar 12, 2024
1 parent 519dc7d commit 5c842c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions backend/api/jobs/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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",
Expand Down
10 changes: 5 additions & 5 deletions backend/nebula/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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",
)

Expand Down

0 comments on commit 5c842c2

Please sign in to comment.