From 6a27199959e0c5ae3418a973d08c86bba1766aeb Mon Sep 17 00:00:00 2001 From: Hussein El Motayam Date: Mon, 15 Jan 2018 04:21:58 +0200 Subject: [PATCH] Fixed the hash JID lookup --- lib/attentive_sidekiq/manager.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/attentive_sidekiq/manager.rb b/lib/attentive_sidekiq/manager.rb index 15336ee..85d1c34 100644 --- a/lib/attentive_sidekiq/manager.rb +++ b/lib/attentive_sidekiq/manager.rb @@ -25,7 +25,7 @@ def update_disappeared_jobs # Those jobs that appeared in the first suspicious list, but not the second one were simply finished # quickly by Sidekiq before showing up as active by a worker. suspicious = AttentiveSidekiq::Suspicious.jobs - those_lost.delete_if{|i| !suspicious.include?(i["jid"])} + those_lost.delete_if{|i| !suspicious.any?{|j| i['jid'] == j['jid']} } those_lost.each do |job| Disappeared.add(job)