From 8acf3c8b6ae92d52b7f30c3035ec72df7bb37c5e Mon Sep 17 00:00:00 2001 From: Tobias Svensson Date: Fri, 6 Jun 2014 11:32:07 +0100 Subject: [PATCH] Store and compare fixnums instead of objects. --- lib/sidetiq/schedule.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sidetiq/schedule.rb b/lib/sidetiq/schedule.rb index 7665a5a..04357ec 100644 --- a/lib/sidetiq/schedule.rb +++ b/lib/sidetiq/schedule.rb @@ -34,8 +34,8 @@ module Sidetiq # Returns true if a job is due, otherwise false. def schedule_next?(time) next_occurrence = @schedule.next_occurrence(time) - if @last_scheduled != next_occurrence - @last_scheduled = next_occurrence + if @last_scheduled != next_occurrence.to_i + @last_scheduled = next_occurrence.to_i return true end false