save user queries in redis so that user can refresh the page and still come back to their latest task

This commit is contained in:
Viktor Barzin 2025-07-06 12:02:25 +00:00
parent a055c92dea
commit d4b22deda0
No known key found for this signature in database
GPG key ID: 4056458DBDBF8863
7 changed files with 114 additions and 4 deletions

View file

@ -18,7 +18,7 @@ detect_floorplan_module = importlib.import_module("4_detect_floorplan")
logger = logging.getLogger("uvicorn.error")
@app.task(bind=True)
@app.task(bind=True, pydantic=True)
def dump_listings_task(self: Task, parameters_json: str) -> dict[str, Any]:
parsed_parameters = QueryParameters.model_validate_json(parameters_json)
asyncio.run(dump_listings_full(self, parsed_parameters))