Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs #644

Merged
merged 3 commits into from
Oct 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions lib/sidekiq_unique_jobs/digests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def add(digest)
#
# @param [String] pattern a key pattern to match with
# @param [Integer] count the maximum number
# @return [Array<String>] with unique digests
# @return [Hash<String,Float>] Hash mapping of digest matching the given pattern and score

def delete_by_pattern(pattern, count: DEFAULT_COUNT)
result, elapsed = timed do
digests = entries(pattern: pattern, count: count).keys
Expand Down Expand Up @@ -80,11 +81,7 @@ def entries(pattern: SCAN_PATTERN, count: DEFAULT_COUNT)
options[:match] = pattern
options[:count] = count

result = redis { |conn| conn.zscan_each(key, **options).to_a }

result.each_with_object({}) do |entry, hash|
hash[entry[0]] = entry[1]
end
redis { |conn| conn.zscan_each(key, **options).to_a }.to_h
end

#
Expand Down
2 changes: 1 addition & 1 deletion sidekiq-unique-jobs.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
spec.post_install_message = <<~POST_INSTALL
IMPORTANT!

Automatic configuration of the sidekiq middelware is no longer done.
Automatic configuration of the sidekiq middleware is no longer done.
Please see: https://github.com/mhenrixon/sidekiq-unique-jobs/blob/master/README.md#add-the-middleware

This version deprecated the following sidekiq_options
Expand Down