Swap the scanner batch size to 20

This commit is contained in:
Zoe Roux 2023-04-05 02:11:11 +09:00
parent e9f9ae5154
commit 259ca2e14e

View File

@ -25,8 +25,8 @@ class Scanner:
async def scan(self, path: str):
logging.info("Starting the scan. It can take some times...")
videos = filter(lambda p: p.is_file(), Path(path).rglob("*"))
# We batch videos by 30 because too mutch at once kinda DDOS everything.
for group in batch(videos, 50):
# We batch videos by 20 because too mutch at once kinda DDOS everything.
for group in batch(videos, 20):
logging.info("Batch finished. Starting a new one")
await asyncio.gather(*map(self.identify, group))