From 69e39678613b0febdebce83603389a5de478ea05 Mon Sep 17 00:00:00 2001 From: Christos Trochalakis Date: Fri, 19 Feb 2021 09:21:12 +0200 Subject: [PATCH] fixup! Move scheduling logic to the mlpop lua command --- lib/resque/data_store.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/resque/data_store.rb b/lib/resque/data_store.rb index dfca673c8..c724c7ee3 100644 --- a/lib/resque/data_store.rb +++ b/lib/resque/data_store.rb @@ -139,8 +139,8 @@ def push_to_queue(queue,encoded_item) # passed to the script (adding a prefix), and we would # have to reverse map the return values. We avoid that # by returning the index instead. - def mlpop(*queues, keys:) - @redis.evalsha(mlpop_sha, keys: keys) + def mlpop(*queues) + @redis.evalsha(mlpop_sha, keys: queues) rescue Redis::CommandError => e # If the script is not found (e.g. when the server # is restarted) reload it. @@ -154,7 +154,7 @@ def mlpop(*queues, keys:) def pop_from_queue(*queues) keys = queues.map { |q| redis_key_for_queue(q) } - key_idx, payload = mlpop(*queues, keys: keys) + key_idx, payload = mlpop(*keys) return nil if key_idx.nil? [queues[Integer(key_idx)], payload]