Skip to content

Commit

Permalink
zrange redis command fix + more permissive redis shard version
Browse files Browse the repository at this point in the history
  • Loading branch information
rmarronnier authored and robacarp committed Jun 12, 2024
1 parent f6b6b62 commit 5736c41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ targets:
dependencies:
redis:
github: jgaskins/redis
version: ~> 0.7.0
version: ~> 0.7

development_dependencies:
minitest:
Expand Down
4 changes: 2 additions & 2 deletions src/mosquito/redis_backend.cr
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ module Mosquito

def self.list_queues : Array(String)
key = build_key(LIST_OF_QUEUES_KEY)
list_queues = redis.zrange(key, 0, -1).as(Array)
list_queues = redis.zrange(key, "0", "-1").as(Array)

return [] of String if list_queues.empty?

Expand Down Expand Up @@ -221,7 +221,7 @@ module Mosquito
if type == "list"
redis.lrange(key, "0", "-1").as(Array(Redis::Value)).map(&.as(String))
elsif type == "zset"
redis.zrange(key, 0, -1).as(Array(Redis::Value)).map(&.as(String))
redis.zrange(key, "0", "-1").as(Array(Redis::Value)).map(&.as(String))
elsif type == "none"
[] of String
else
Expand Down

0 comments on commit 5736c41

Please sign in to comment.