fix: resolve broken TOC link in remote-tech-jobs and optimize video enrichment script

This commit is contained in:
Nubenetes Bot
2026-05-22 17:02:45 +02:00
parent a8401346bd
commit 6ca32c0414
2 changed files with 13 additions and 1 deletions

View File

@@ -5,7 +5,6 @@
3. [Kubernetes](#kubernetes)
4. [Spain](#spain)
5. [Tweets](#tweets)
6. [Videos](#videos)
## Introduction

View File

@@ -72,15 +72,28 @@ async def main():
if not os.path.exists(INVENTORY_PATH):
return
force_enrich = os.getenv("FORCE_ENRICH", "false").lower() == "true"
with open(INVENTORY_PATH, "r") as f:
inventory = yaml.safe_load(f)
video_urls = [u for u, e in inventory.items() if e.get("is_featured_video")]
tasks = []
skipped = 0
for url in video_urls:
if inventory[url].get("is_enriched") and not force_enrich:
skipped += 1
continue
tasks.append(enrich_video_entry(url, inventory[url]))
if skipped > 0:
log_event(f"[*] Skipped {skipped} already enriched videos. Use FORCE_ENRICH=true to re-process.")
if not tasks:
log_event("[*] No videos need enrichment.")
return
# Process in small batches to respect rate limits
batch_size = 5
for i in range(0, len(tasks), batch_size):