add tenacity to retry transient blockouts by rightmove

This commit is contained in:
Viktor Barzin 2025-06-08 20:59:04 +00:00
parent 289206afc0
commit 9b2653ce91
No known key found for this signature in database
GPG key ID: 4056458DBDBF8863
3 changed files with 20 additions and 3 deletions

View file

@ -1,12 +1,11 @@
# from diskcache import Cache
import asyncio
from dataclasses import dataclass
from datetime import datetime
import enum
from typing import Any
import aiohttp
from data_access import Listing
from models.listing import FurnishType, ListingType, QueryParameters
from tenacity import retry, wait_random
headers = {
@ -27,6 +26,7 @@ class PropertyType(enum.StrEnum):
TERRACED = "terraced"
@retry(wait=wait_random(min=1, max=2))
async def detail_query(detail_id: int) -> dict[str, Any]:
params = {
"apiApplication": "ANDROID",