Skip to content

Poll the store every 30s while the Friday release lands - #138

Merged
mspinola merged 1 commit into
mainfrom
claude/release-window-poll
Sep 25, 2026
Merged

mspinola merged 1 commit into
mainfrom
claude/release-window-poll

Conversation

@mspinola

Copy link
Copy Markdown
Owner

Why

The store poller checked every 5 minutes, always. After a Friday release reached the server, it could therefore sit there for up to 5 minutes before the rebuild and the weekly email started. With the rebuild now under a minute (cotmetrics 0.14.2 and 0.14.3), that wait is the largest delay left that this box controls.

What

  • The poller checks every 30s on Fridays 15:25 to 16:30 ET. That covers the CFTC's 15:30 release, the Windows producer's Friday poll (every 2 minutes from 15:25 for 45 minutes), and sync time.
  • seconds_until_next_poll also caps the sleep at the window's start, so a 5-minute sleep begun at 15:24 does not carry the first tick to 15:29.
  • The always-on 5-minute baseline stays. The replica can move at times no schedule predicts, so that part must never become a window. The window only tightens it, and a tick is two small JSON reads.
  • The window is Fridays only because the producer polls only on Fridays. A holiday-week release reaches this box with the next 08:10 catch-up regardless.
  • The startup log line now states both cadences.

Tests

tests/test_store_poll_interval.py (11 tests) covers the window edges, other days, a sleep capped at the window's start, and the window staying in Eastern time when now arrives in UTC, summer and winter. Full suite: 897 passed. ruff check src tests clean.

🤖 Generated with Claude Code

The store poller checked every 5 minutes, always, so a Friday release
could sit on the replica for up to 5 minutes before the rebuild and the
weekly email started. Now 30s on Fridays 15:25-16:30 ET: the CFTC's
15:30 release, the Windows producer's 45-minute poll from 15:25, and
sync time. The sleep also ends at the window's start, so a 5-minute
sleep begun at 15:24 does not carry the first tick to 15:29.

The always-on 5-minute baseline stays: the replica can move at times no
schedule predicts, so that part must never become a window. The window
only tightens it, and a tick is two small JSON reads. Fridays only,
because the producer polls only on Fridays; a holiday-week release
reaches this box with the next 08:10 catch-up regardless.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mspinola
mspinola merged commit 495a9f0 into main Sep 25, 2026
3 checks passed
@mspinola
mspinola deleted the claude/release-window-poll branch September 25, 2026 20:47
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.

1 participant