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
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
Expanded checks against Go-generated conformance fixtures to cover cron schedules, snooze counters, all shared metadata keys, and queue-control and leadership notification emission through both SQL drivers. PR #1463.
Added CRON_TZ= / TZ= prefixes, ? wildcards, and Go-style @every durations to PeriodicCron. PR #1463.
Changed
Ruby is now developed in the main River repository. Gem names and require paths are unchanged. The four public gems (riverqueue, riverqueue-activerecord, riverqueue-sequel, and riverqueue-rails) are released together. PR #1463.
Job insertion accepts only available, pending, and scheduled states. running, retryable, and terminal states are rejected, including when set by insertion hooks. PR #1463.
Insertion rejects queue names containing characters other than ASCII letters, digits, underscores, hyphens, colons, or periods. Nonzero UniqueOpts#by_period values must be at least one second. PR #1463.
Attempt counts must be between 0 and 32,767, and max_attempts must be between 1 and 32,767. These bounds also apply on SQLite. job_retry raises ArgumentError when another attempt would exceed the limit. PR #1463.
Job and queue metadata updates require a Hash; JSON-encoded strings are no longer accepted. Pass an empty Hash to clear metadata. Updates to attempted_by require string entries. PR #1463.
Fixed
Externally claimed jobs honor worker retry hooks, including Active Job's retry policy, and use their claim timestamps for queue-wait statistics and attempt errors. Worker initialization failures are logged without losing the reported work error. PR #1463.
Externally reported cancellation, snooze, and interruption signals follow normal worker finalization instead of being recorded as ordinary failures. PR #1463.
Graceful shutdown and queue removal continue observing remote cancellation until active jobs finish, including when worker timeouts are disabled or cancellation polling temporarily fails. Draining waits respect polling intervals and wake when the last attempt finishes. PR #1463.
Blocking lifecycle calls from the client's own runtime threads fail immediately instead of waiting for themselves. Workers can still request nonblocking stop. PR #1463.
Inserts reject states other than available, pending, and scheduled, preventing stranded running jobs without attempt timestamps. Insertion hooks are checked after all callbacks run, and invalid batches roll back hook writes. PR #1463.
The Sequel driver preserves application ArgumentError exceptions raised inside SQLite transactions after rolling back, including validation errors from insertion hooks. PR #1463.
Job inserts and updates reject attempt limits above 32,767 consistently across databases. Attempt updates and manual retries enforce the portable counter range, and claims tolerate counters already at the limit. PR #1463.
Wildcard queue pause and resume publish events for every affected queue, including beyond 100 queues. Events use the update's snapshots so concurrent changes cannot replace their contents or introduce unrelated queues. PR #1463.
Manually retrying a cancelled job clears the old cancellation request so its next attempt can complete. PR #1463.
Cancellation wins atomically over discarded attempts and other state transitions, including the last attempt or a worker that disables retries. PR #1463.
Stuck-job rescue falls back to the default retry policy per job when an application policy fails or returns an invalid time, allowing recovery and cleanup to continue. PR #1463.
Clients without consumer queues run configured periodic jobs and maintenance services. Adding periodic jobs starts maintenance when needed; registration is rejected when leader election is disabled. PR #1463.
Bulk deletion excludes running jobs before applying its limit and locks eligible PostgreSQL rows so concurrent retries cannot cause deletion of jobs that no longer match the filters. PR #1463.
Stuck-job rescue respects longer or disabled client and worker timeouts and scans past protected attempts without consuming the rescue limit. PR #1463.
Snoozing and rescue tolerate JSON counters that overflow SQLite's floating-point representation. PR #1463.
Snoozing tolerates nonnumeric metadata counters instead of failing on booleans or collections. Ruby-specific recovery cases are tested independently of the shared Go fixtures. PR #1463.
Periodic jobs now carry periodic: true and, when named, river:periodic_job_id, while preserving constructor options and application metadata. PR #1463.
Queue pause, resume, metadata changes, and leader resignation now broadcast notifications for clients in other languages. Notifications commit and roll back with the corresponding database change. PR #1463.
Cron schedules include both occurrences of repeated daylight-saving times when given a local reference time. PR #1463.
Job insertion rejects invalid queue names, nonpositive attempt limits, and nonzero uniqueness periods shorter than one second before writing any jobs. PR #1463.
Custom maintenance service failures are logged without blocking other services, stuck-job rescue, or cleanup. PR #1463.
Job updates reject non-object metadata before writing to the database, preserving the existing job when invalid metadata is supplied. PR #1463.
Job completion atomically checks for cancellation so a concurrent cancellation cannot be overwritten by completion, including when finalization hooks are configured. PR #1463.
Job updates reject nonpositive attempt limits consistently on PostgreSQL and SQLite. PR #1463.
Job lifecycle events report worker execution and completion durations separately using a monotonic clock. PR #1463.
Finalization hooks that delete jobs honor concurrent cancellation and record the cancelled attempt instead of deleting it. PR #1463.
Queue metadata writes and job metadata merges reject non-object values before changing persisted data. Job updates also reject non-string worker IDs in attempt histories. PR #1463.
Unique inserts with exclude_kind preserve the existing job's kind when a different kind conflicts, on both databases and through both drivers. PR #1463.
Retrying, snoozing, and interrupting jobs preserve the original queue-wait duration in lifecycle events. PR #1463.
Invalid rescue counters no longer prevent other stuck jobs in the batch from being rescued. PR #1463.
SQLite retains only the newest 100 worker IDs when claiming a job, matching PostgreSQL. PR #1463.
Attempt-error serialization supports frozen timestamps and preserves the caller's timezone. PR #1463.