1
0
Fork 0
mirror of https://github.com/endofunky/sidetiq.git synced 2022-11-09 13:53:30 -05:00

Store and compare fixnums instead of objects.

This commit is contained in:
Tobias Svensson 2014-06-06 11:32:07 +01:00
parent 3fb22a0c7f
commit 8acf3c8b6a

View file

@ -34,8 +34,8 @@ module Sidetiq
# Returns true if a job is due, otherwise false. # Returns true if a job is due, otherwise false.
def schedule_next?(time) def schedule_next?(time)
next_occurrence = @schedule.next_occurrence(time) next_occurrence = @schedule.next_occurrence(time)
if @last_scheduled != next_occurrence if @last_scheduled != next_occurrence.to_i
@last_scheduled = next_occurrence @last_scheduled = next_occurrence.to_i
return true return true
end end
false false