• Sean McGivern's avatar
    Use old version of Sidekiq scheduled job enqueuer · c3cb5da7
    Sean McGivern authored
    The old version took the first job in the scheduled (or retry) set,
    tried to schedule it, then looped.
    
    The new version takes the first 100 jobs from the set, tries to schedule
    each in turns, then loops. This is designed to reduce scheduling
    latency, but on GitLab.com we're seeing increased Redis CPU usage and a
    high number of ZREM commands (most of which will be redundant) due to
    multiple poller threads from different processes operating at the same
    time.
    
    This change reverts to using the old behaviour, while remaining on
    Sidekiq 6.
    c3cb5da7
sidekiq.rb 4.36 KB