Skip to content

Commit

Permalink
fix: specs
Browse files Browse the repository at this point in the history
  • Loading branch information
Amnesthesia committed Nov 2, 2023
1 parent c466fee commit 769de31
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/sidekiq_unique_jobs/redis/sorted_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class SortedSet < Entity
# @return [Hash] when given with_scores: true
#
def entries(with_scores: true)
entrys = redis { |conn| conn.zrange(key, 0, -1, withscores: with_scores) }
return entrys unless with_scores
return redis { |conn| conn.zrange(key, 0, -1) } unless with_scores
entrys = redis { |conn| conn.zrange(key, 0, -1, 'withscores') }

entrys.each_with_object({}) { |pair, hash| hash[pair[0]] = pair[1] }
end
Expand Down
10 changes: 5 additions & 5 deletions spec/sidekiq_unique_jobs/cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
jobs del PATTERN
Options:
d, [--dry-run], [--no-dry-run] # set to false to perform deletion
c, [--count=N] # The max number of digests to return
# Default: 1000
-d, [--dry-run], [--no-dry-run] # set to false to perform deletion
-c, [--count=N] # The max number of digests to return
# Default: 1000
deletes unique digests from redis by pattern
HEADER
Expand All @@ -55,8 +55,8 @@
jobs list PATTERN
Options:
c, [--count=N] # The max number of digests to return
# Default: 1000
-c, [--count=N] # The max number of digests to return
# Default: 1000
list all unique digests and their expiry time
HEADER
Expand Down

0 comments on commit 769de31

Please sign in to comment.