You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ClusterCron InitialRun messages are deduplicated on pod restart, breaking cron chain #6
When using ClusterCron.make() with SQL storage, the InitialRun singleton's message gets silently rejected on pod/process restart if a previous "initial" message still exists in the database. This breaks the cron chain and requires manual database cleanup to fix.
Current Behavior
First deployment: InitialRun singleton creates a message with entity_id="initial" and message_id="ClusterCron/{name}/initial/run/"
Cron chain works correctly, scheduling subsequent runs with timestamp-based entity_ids
Pod restarts (or deployment update)
InitialRun singleton attempts to create a new "initial" message
Message is silently rejected due to UNIQUE constraint on message_id in cluster_messages table
Cron chain is broken - no new executions occur
Expected Behavior
Pod restarts should not break the cron chain. Either:
InitialRun should detect an existing cron chain and skip re-initialization
InitialRun messages should have unique message_ids (e.g., include timestamp)
The message should use upsert semantics
Root Cause
The CronPayload class has an empty PrimaryKey:
// From @effect/cluster/src/ClusterCron.tsclassCronPayloadextendsSchema.Class<CronPayload>("@effect/cluster/ClusterCron/CronPayload")({dateTime: Schema.DateTimeUtc}){[PrimaryKey.symbol](){return""// Empty string means all InitialRun messages have same message_id}// ...}
Activity