Przeglądaj źródła

Rename ArchiveDownloader => SnapshotWorker

jherve 1 rok temu
rodzic
commit
55d15f42a9
1 zmienionych plików z 4 dodań i 4 usunięć
  1. 4 4
      src/de_quoi_parle_le_monde/main.py

+ 4 - 4
src/de_quoi_parle_le_monde/main.py

@@ -14,7 +14,7 @@ from de_quoi_parle_le_monde.storage import Storage
 
 
 @frozen
-class ArchiveDownloader:
+class SnapshotWorker:
     storage: Storage
     ia_client: InternetArchiveClient
 
@@ -93,14 +93,14 @@ class ArchiveDownloader:
 
 
 async def download_all(http_client: HttpClient, storage: Storage, n_days: int, hours: list[int]):
-    dts = ArchiveDownloader.last_n_days_at_hours(n_days, hours)
+    dts = SnapshotWorker.last_n_days_at_hours(n_days, hours)
 
     async with http_client.session() as session:
         ia = InternetArchiveClient(session)
-        dler = ArchiveDownloader(storage, ia)
+        worker = SnapshotWorker(storage, ia)
 
         return await asyncio.gather(
-            *[dler.handle_snap(c, d) for d in dts for c in media_collection.values()]
+            *[worker.handle_snap(c, d) for d in dts for c in media_collection.values()]
         )