lib/reactor/event.rb in reactor-0.4.4 vs lib/reactor/event.rb in reactor-0.4.5
- old
+ new
@@ -72,9 +72,10 @@
job = scheduled_jobs.detect do |job|
job['class'] == self.class.name.to_s
job['args'].first == name.to_s &&
job.score.to_i == data[:was].to_i
end
+ return if job.nil?
job.delete
publish(name, data.except(:was)) if data[:at].future?
end
end