Skip to content

fix(cron): align scheduling with database time - #19

Merged
psteinroe merged 5 commits into
mainfrom
feat/clock-skew
Sep 17, 2026
Merged

psteinroe merged 5 commits into
mainfrom
feat/clock-skew

Conversation

@psteinroe

@psteinroe psteinroe commented Sep 14, 2026

Copy link
Copy Markdown
Owner

Align cron scheduling with the Postgres clock by sampling it into a worker-local offset.

Fail-open sampling

If a clock sample fails, the worker uses its current offset (local time initially), logs the failure, and retries ten minutes later. Refreshes are chained to avoid overlap, and worker shutdown clears the refresh timer.

Closes #13

@psteinroe
psteinroe changed the base branch from main to test/integration-synchronization September 15, 2026 13:23
@psteinroe
psteinroe force-pushed the test/integration-synchronization branch from 3de7a09 to f219f0d Compare September 17, 2026 18:21
@psteinroe
psteinroe changed the base branch from test/integration-synchronization to main September 17, 2026 19:41
@psteinroe
psteinroe merged commit 346df2e into main Sep 17, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle Clock Skew

1 participant