← All posts

Sources that sync themselves

A source's schedule now actually fires — runSync runs inside a durable Temporal Workflow on a Schedule, so connectors keep their knowledge fresh on their own cadence, crash-safe and incremental.

Vocion Teamvocion-v1.37.0

A connector could declare a schedule — 0 6 * * *, every morning — but nothing ran it. Syncs were manual. This release makes the schedule real (v1.37): a source syncs itself on its cron, durably.

runSync, inside a durable workflow

The actual sync — fetch, dedup, embed, scope — already lived in runSync. Now a Temporal Schedule starts a sourceSyncWorkflow on the source's cron; the workflow calls a syncSourceActivity that runs runSync in the worker process. Because it's a Temporal workflow, a crash mid-sync doesn't lose the run — Temporal's event history is the source of truth, and the activity retries on its own backoff.

Scheduled runs are incremental by default: each one resumes from the source's checkpoint and fetches only what changed since the last watermark. A daily Google Ads sync pulls yesterday's numbers, not the whole account, every day.

One Schedule per source, idempotent

ensureSourceSchedule creates (or updates, in place) exactly one Schedule per source, namespaced source-sync-<org>-<source> so tenants and sources never collide. Turn a source off and its Schedule goes with it. No double-syncs, no orphaned timers.

Why it matters

It's the difference between a deployment you have to poke and one that runs. The two reference deployments — RevOps and a PPC/CRO client — declare daily and half-hourly syncs in their workspaces; with this, those crons fire on their own. Connect the accounts once, and the knowledge stays fresh without anyone pressing sync.