Skip to main content
A worker combines code, a trigger, output tables, configuration, secrets, and resource hints. One dispatch invokes one bounded run. The same portable specification can register on a local server or in Verglas Cloud.

Worker invariants

Design every worker around the following rules:
  • Treat the trigger and committed table data as the complete input to a run.
  • Keep no durable process state between runs.
  • Use the cron event’s half-open interval [intervalStart, intervalEnd) for incremental pulls.
  • Read output table names from deployment configuration instead of hard-coding them.
  • Make every commit idempotent so a replay does not duplicate data.
  • Read secrets from the runtime environment and never write them to logs.

Worker lifecycle

Current trigger surfaces

The SDK contract defines the following trigger events: The portable CLI manifest currently registers cron and manual cloud workers. It also registers local-only follow workers. The SDK types the broader trigger contract used by the platform runtime.

Create a portable worker

The current manifest supports JSON and TOML. This filled TOML example packages a Python entrypoint and a referenced secret:
metrics-worker.toml
Create the secret and worker in the cloud:
Register the same file locally:

Inspect and operate workers

Pass --json before workers when a script needs a stable machine-readable response.

Backfill with logical time

The TypeScript worker contract supports startDate and catchup on cron trigger definitions:
Each replayed run receives its own logical interval. Range the upstream request over that interval. Do not store a cross-run watermark in the worker.

Use idempotency keys

Use a stable input identifier as the commit idempotency key. A data_change worker can use the input snapshot ID:
If the platform replays the trigger, the duplicate commit becomes a no-op instead of appending the same rows twice.