mirror of
https://github.com/nubenetes/awesome-kubernetes.git
synced 2026-05-24 18:13:48 +00:00
fix: limit concurrency for URL expansion to 20 parallel requests
This commit is contained in:
@@ -85,10 +85,13 @@ async def master_orchestrator():
|
||||
# 3. Expansión y Deduplicación Inicial
|
||||
log_event(f"[*] Expandiendo y deduplicando {len(all_raw_assets)} enlaces brutos...")
|
||||
|
||||
semaphore = asyncio.Semaphore(20) # Máximo 20 peticiones simultáneas
|
||||
|
||||
async def process_asset(asset):
|
||||
expanded_url = await resolve_url(asset["url"])
|
||||
asset["url"] = expanded_url
|
||||
return asset
|
||||
async with semaphore:
|
||||
expanded_url = await resolve_url(asset["url"])
|
||||
asset["url"] = expanded_url
|
||||
return asset
|
||||
|
||||
all_raw_assets = await asyncio.gather(*[process_asset(a) for a in all_raw_assets])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user