lib/rufus/scheduler.rb in rufus-scheduler-3.1.2 vs lib/rufus/scheduler.rb in rufus-scheduler-3.1.3
- old
+ new
@@ -37,11 +37,11 @@
require 'rufus/scheduler/jobs'
require 'rufus/scheduler/cronline'
require 'rufus/scheduler/job_array'
require 'rufus/scheduler/locks'
- VERSION = '3.1.2'
+ VERSION = '3.1.3'
#
# A common error class for rufus-scheduler
#
class Error < StandardError; end
@@ -590,14 +590,14 @@
work_threads(:active).each do |t|
job = t[:rufus_scheduler_job]
to = t[:rufus_scheduler_timeout]
+ ts = t[:rufus_scheduler_time]
- next unless job && to
+ next unless job && to && ts
# thread might just have become inactive (job -> nil)
- ts = t[:rufus_scheduler_time]
to = to.is_a?(Time) ? to : ts + to
next if to > Time.now
t.raise(Rufus::Scheduler::TimeoutError)