Sfoglia il codice sorgente

Balanced concurrency

ZiB 4 mesi fa
parent
commit
721e46d01b
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      room_cal/service_api/_airbnb.py

+ 1 - 1
room_cal/service_api/_airbnb.py

@@ -324,7 +324,7 @@ class _AirbnbClient:
       dt = datetime.fromisoformat(ts.replace('Z', '+00:00'))
       dt = datetime.fromisoformat(ts.replace('Z', '+00:00'))
       return dt.astimezone(ZoneInfo(self._tz)).date().isoformat()
       return dt.astimezone(ZoneInfo(self._tz)).date().isoformat()
 
 
-    _sem = asyncio.Semaphore(15)
+    _sem = asyncio.Semaphore(10)
 
 
     async def fetch_details(c: str) -> tuple[str, str | None, str | None, str | None, str | None, str | None]:
     async def fetch_details(c: str) -> tuple[str, str | None, str | None, str | None, str | None, str | None]:
       async with _sem:
       async with _sem: