Module: Wurk::Scheduled

Defined in:
lib/wurk/scheduled.rb

Overview

Promotes due jobs from the ‘retry` and `schedule` sorted sets back onto their target queues. One Poller thread per process; collectively they drain both SETS via an atomic Lua pop-by-score (loaded via the EVALSHA cache, retried once on NOSCRIPT). Polling cadence scales with cluster size so total scheduler traffic stays constant as processes are added.

Spec: docs/target/sidekiq-free.md §16. Pluggable via ‘config`.

Defined Under Namespace

Classes: Enq, Poller

Constant Summary collapse

SETS =
%w[retry schedule].freeze
LUA_ZPOPBYSCORE =

Atomic pop-by-score for retry/schedule. Source must match Wurk::Lua::ZPOPBYSCORE byte-for-byte — they share the same SHA.

Wurk::Lua::ZPOPBYSCORE