From d232844225664c5ac9b8968b6e7a8ab54c115519 Mon Sep 17 00:00:00 2001 From: Mike Perham Date: Fri, 8 Feb 2013 14:57:01 -0800 Subject: [PATCH] Dont srem when empty, fixes #694 --- lib/sidekiq/manager.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sidekiq/manager.rb b/lib/sidekiq/manager.rb index 99add188..cc6035ef 100644 --- a/lib/sidekiq/manager.rb +++ b/lib/sidekiq/manager.rb @@ -130,7 +130,7 @@ module Sidekiq workers_to_remove = workers.select do |worker_name| worker_name =~ /:#{process_id}-/ end - conn.srem('workers', workers_to_remove) + conn.srem('workers', workers_to_remove) if !workers_to_remove.empty? end logger.debug { "Terminating worker threads" }