Sha256: bffffe3ef6dc490d937ef3f17acce24d1f72053c2bc5ba8564b8b9696b0c69d5

Contents?: true

Size: 608 Bytes

Versions: 61

Compression:

Stored size: 608 Bytes

Contents

# frozen_string_literal: true

module SidekiqUniqueJobs
  module Redis
    #
    # Class Set provides convenient access to redis sets
    #
    # @author Mikael Henriksson <mikael@mhenrixon.com>
    #
    class Set < Entity
      #
      # Return entries for this set
      #
      #
      # @return [Array<String>]
      #
      def entries
        redis { |conn| conn.smembers(key) }
      end

      #
      # Returns the count for this sorted set
      #
      #
      # @return [Integer] the number of entries
      #
      def count
        redis { |conn| conn.scard(key) }
      end
    end
  end
end

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
sidekiq-unique-jobs-7.1.3 lib/sidekiq_unique_jobs/redis/set.rb
sidekiq-unique-jobs-7.1.2 lib/sidekiq_unique_jobs/redis/set.rb
sidekiq-unique-jobs-7.1.1 lib/sidekiq_unique_jobs/redis/set.rb
sidekiq-unique-jobs-7.1.0 lib/sidekiq_unique_jobs/redis/set.rb
sidekiq-unique-jobs-7.0.12 lib/sidekiq_unique_jobs/redis/set.rb
sidekiq-unique-jobs-7.0.11 lib/sidekiq_unique_jobs/redis/set.rb
sidekiq-unique-jobs-7.0.10 lib/sidekiq_unique_jobs/redis/set.rb
sidekiq-unique-jobs-7.0.9 lib/sidekiq_unique_jobs/redis/set.rb
sidekiq-unique-jobs-7.0.8 lib/sidekiq_unique_jobs/redis/set.rb
sidekiq-unique-jobs-7.0.7 lib/sidekiq_unique_jobs/redis/set.rb
sidekiq-unique-jobs-7.0.6 lib/sidekiq_unique_jobs/redis/set.rb
sidekiq-unique-jobs-7.0.5 lib/sidekiq_unique_jobs/redis/set.rb
sidekiq-unique-jobs-7.0.4 lib/sidekiq_unique_jobs/redis/set.rb
sidekiq-unique-jobs-7.0.3 lib/sidekiq_unique_jobs/redis/set.rb
sidekiq-unique-jobs-7.0.2 lib/sidekiq_unique_jobs/redis/set.rb
sidekiq-unique-jobs-7.0.1 lib/sidekiq_unique_jobs/redis/set.rb
sidekiq-unique-jobs-7.0.0 lib/sidekiq_unique_jobs/redis/set.rb
sidekiq-unique-jobs-7.0.0.beta29 lib/sidekiq_unique_jobs/redis/set.rb
sidekiq-unique-jobs-7.0.0.beta28 lib/sidekiq_unique_jobs/redis/set.rb
sidekiq-unique-jobs-7.0.0.beta27 lib/sidekiq_unique_jobs/redis/set.rb