Skip to content

_start_actors()

Class: JobsAustriaDetailsETL
File: jobs_austria_details_scraping.py ยท line 191

Start all Apify actor runs and return their run IDs.

Signature

Parameters configs
Returns list
Async No
Visibility Private

Implementation

def _start_actors(configs: list[dict]) -> list[str]:
    """Start all Apify actor runs and return their run IDs."""
    client = ApifyClient(token=os.getenv("APIFY_API_KEY"))
    run_ids = []
    for cfg in configs:
        run_info = client.actor(cfg["actor_id"]).start(run_input=cfg["run_input"])
        run_ids.append(run_info["id"])
    logs.info(f"Started {len(run_ids)} actor runs.")
    return run_ids