Sha256: 0d9d3bb9f70aed57abd52ed3bfdb72a513b58cd9c360167ef2413560fdcb20ef

Contents?: true

Size: 701 Bytes

Versions: 19

Compression:

Stored size: 701 Bytes

Contents

# frozen_string_literal: true

module SidekiqUniqueJobs
  module Orphans
    #
    # Class DeleteOrphans provides deletion of orphaned digests
    #
    # @note this is a much slower version of the lua script but does not crash redis
    #
    # @author Mikael Henriksson <mikael@mhenrixon.com>
    #
    class LuaReaper < Reaper
      #
      # Delete orphaned digests
      #
      #
      # @return [Integer] the number of reaped locks
      #
      def call
        call_script(
          :reap_orphans,
          conn,
          keys: [DIGESTS, EXPIRING_DIGESTS, SCHEDULE, RETRY, PROCESSES],
          argv: [reaper_count, (Time.now - reaper_timeout).to_f],
        )
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
sidekiq-unique-jobs-8.0.10 lib/sidekiq_unique_jobs/orphans/lua_reaper.rb
sidekiq-unique-jobs-7.1.33 lib/sidekiq_unique_jobs/orphans/lua_reaper.rb
sidekiq-unique-jobs-7.1.32 lib/sidekiq_unique_jobs/orphans/lua_reaper.rb
sidekiq-unique-jobs-8.0.9 lib/sidekiq_unique_jobs/orphans/lua_reaper.rb
sidekiq-unique-jobs-8.0.8 lib/sidekiq_unique_jobs/orphans/lua_reaper.rb
sidekiq-unique-jobs-8.0.7 lib/sidekiq_unique_jobs/orphans/lua_reaper.rb
sidekiq-unique-jobs-8.0.6 lib/sidekiq_unique_jobs/orphans/lua_reaper.rb
sidekiq-unique-jobs-7.1.31 lib/sidekiq_unique_jobs/orphans/lua_reaper.rb
sidekiq-unique-jobs-8.0.5 lib/sidekiq_unique_jobs/orphans/lua_reaper.rb
sidekiq-unique-jobs-8.0.4 lib/sidekiq_unique_jobs/orphans/lua_reaper.rb
sidekiq-unique-jobs-7.1.30 lib/sidekiq_unique_jobs/orphans/lua_reaper.rb
sidekiq-unique-jobs-8.0.3 lib/sidekiq_unique_jobs/orphans/lua_reaper.rb
sidekiq-unique-jobs-8.0.2 lib/sidekiq_unique_jobs/orphans/lua_reaper.rb
sidekiq-unique-jobs-8.0.1 lib/sidekiq_unique_jobs/orphans/lua_reaper.rb
sidekiq-unique-jobs-8.0.0 lib/sidekiq_unique_jobs/orphans/lua_reaper.rb
sidekiq-unique-jobs-7.1.29 lib/sidekiq_unique_jobs/orphans/lua_reaper.rb
sidekiq-unique-jobs-7.1.28 lib/sidekiq_unique_jobs/orphans/lua_reaper.rb
sidekiq-unique-jobs-7.1.27 lib/sidekiq_unique_jobs/orphans/lua_reaper.rb
sidekiq-unique-jobs-7.1.26 lib/sidekiq_unique_jobs/orphans/lua_reaper.rb