web / lib/jobs/handlers/scraper-execution-job
lib/jobs/handlers/scraper-execution-job
Background job handler for executing scrapers via the TimeScrape runner API.
This job loads a scraper definition, calls the external runner service, records the result as a scraper-run, and optionally triggers the import pipeline when autoImport is enabled.
Variables
scraperExecutionJob
constscraperExecutionJob:object
Type Declaration
slug
slug:
string="scraper-execution"
handler
handler: (
context) =>Promise<{ output: \{ runId: number; status: "success" \| "failed" \| "timeout"; durationMs: number; outputRows: number \| undefined; ingestFileId?: string \| number; }; }>
Parameters
context
Returns
Promise<{ output: \{ runId: number; status: "success" \| "failed" \| "timeout"; durationMs: number; outputRows: number \| undefined; ingestFileId?: string \| number; }; }>
Last updated on