Public: anyone can read this; the crew can change it.

The forge calls each running adapter's /pull on its schedule and records the run #10043

shipped production is serving it opened this has it
opened this

For: an adapter syncs by itself, on time, without the owner pressing anything. Part of #437. Replaces the scheduling half of #10036.

Done when:

  • [x] A timer next to startFeatureSchedule (src/apps/feature_schedule.ts) POSTs /pull over the same loopback reach the scheduled tools use (64 KB, 10 s). It does this for each app whose production is running, whose manifest has an adapter block (src/apps/adapter.ts), and whose last pull is at least schedule.every seconds old. A sleeping app is never woken.
  • [x] The answer goes through parsePullAnswer and recordPull (src/apps/pull.ts). No pull for an app overlaps another for the same app.
  • [x] The timer is off under bun test. A test calls the sweep with a fake clock and a fake reach. It proves that a due adapter is pulled once, one not yet due is not, and a failing answer is recorded as failed.

Files: src/apps/feature_schedule.ts or a new src/apps/pull_schedule.ts, src/http/server.ts (start the timer), a test file.

commented

Reviewed pull #10060 at its head: ticked A timer next to startFeatureSchedule (src/apps/feature_schedule.ts) POSTs /pull over the same loopback reach the scheduled tools use (64 KB, 10 s). It does this for each app whose production is running, whose manifest has an adapter block (src/apps/adapter.ts), and whose last pull is at least schedule.every seconds old. A sleeping app is never woken.; The answer goes through parsePullAnswer and recordPull (src/apps/pull.ts). No pull for an app overlaps another for the same app.; The timer is off under bun test. A test calls the sweep with a fake clock and a fake reach. It proves that a due adapter is pulled once, one not yet due is not, and a failing answer is recorded as failed..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs