migrate background tasks to celery
This commit is contained in:
parent
efe3248c07
commit
93129333e6
7 changed files with 106 additions and 101 deletions
|
|
@ -8,7 +8,7 @@ from pathlib import Path
|
|||
from typing import Any, Dict, List
|
||||
from pydantic import BaseModel
|
||||
from rec import routing
|
||||
from sqlmodel import JSON, SQLModel, Field, String
|
||||
from sqlmodel import JSON, TEXT, SQLModel, Field, String
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
|
|
@ -63,7 +63,7 @@ class Listing(SQLModel, table=False):
|
|||
longtitude: float = Field(nullable=False)
|
||||
latitude: float = Field(nullable=False)
|
||||
# price_history: List[Dict[str, Any]] = Field(default_factory=list, sa_type=JSON)
|
||||
price_history_json: str = Field(sa_type=String)
|
||||
price_history_json: str = Field(sa_type=TEXT)
|
||||
listing_site: ListingSite = Field(nullable=False)
|
||||
last_seen: datetime = Field(default_factory=datetime.now, nullable=False)
|
||||
photo_thumbnail: str | None = Field(default=None, nullable=True)
|
||||
|
|
@ -74,7 +74,7 @@ class Listing(SQLModel, table=False):
|
|||
default_factory=dict, sa_type=JSON, nullable=False
|
||||
)
|
||||
routing_info_json: str = Field(
|
||||
sa_type=String, nullable=True, default=None
|
||||
sa_type=TEXT, nullable=True, default=None
|
||||
) # Store as JSON string for simplicity
|
||||
|
||||
@property
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue