Screenshot backfill: 1x CPU workers in normal mode (not just 1)
This commit is contained in:
parent
cd56e23a75
commit
ad05d1a308
1 changed files with 2 additions and 2 deletions
|
|
@ -874,9 +874,9 @@ class NeoPig:
|
|||
|
||||
logger.info(f"Backfilling {len(pages)} missing screenshots for {domain}")
|
||||
|
||||
# Concurrent workers: 3x CPU in fast mode, 1 otherwise (for crawl delay)
|
||||
# Concurrent workers: 3x CPU in fast mode, 1x CPU otherwise (crawl delay handled per-capture)
|
||||
import multiprocessing
|
||||
max_workers = multiprocessing.cpu_count() * 3 if fast_mode else 1
|
||||
max_workers = multiprocessing.cpu_count() * 3 if fast_mode else multiprocessing.cpu_count()
|
||||
semaphore = asyncio.Semaphore(max_workers)
|
||||
if fast_mode and max_workers > 1:
|
||||
logger.info(f"Fast mode: {max_workers} concurrent workers")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue