Summary
Multi-worker deployments need durable circuit-breaker state and sequence numbers across processes. Reference SQLAlchemy ORM implementation of the supervisor seam shipped in PR #348.
Design
Tables
webhook_circuit_state — per-endpoint state (open/half-open/closed, failure counts, next attempt timestamp)
webhook_delivery_queue — in-flight retry queue, polled with FOR UPDATE SKIP LOCKED
webhook_delivery_log — audit history
Pattern
Cross-process sequence-number durability via DB primary key. Pattern proves out the broader "Postgres-as-queue" approach used by graphile-worker and river. The FOR UPDATE SKIP LOCKED polling is the canonical multi-worker leasing primitive.
Adoption story
Salesagent's migration plan flags multi-worker durability as a real blocker at scale — this lands the reference adopters can fork.
Cross-references
🤖 Generated with Claude Code
Summary
Multi-worker deployments need durable circuit-breaker state and sequence numbers across processes. Reference SQLAlchemy ORM implementation of the supervisor seam shipped in PR #348.
Design
Tables
webhook_circuit_state— per-endpoint state (open/half-open/closed, failure counts, next attempt timestamp)webhook_delivery_queue— in-flight retry queue, polled withFOR UPDATE SKIP LOCKEDwebhook_delivery_log— audit historyPattern
Cross-process sequence-number durability via DB primary key. Pattern proves out the broader "Postgres-as-queue" approach used by graphile-worker and river. The
FOR UPDATE SKIP LOCKEDpolling is the canonical multi-worker leasing primitive.Adoption story
Salesagent's migration plan flags multi-worker durability as a real blocker at scale — this lands the reference adopters can fork.
Cross-references
🤖 Generated with Claude Code