lib/openwfe/expressions/fe_sleep.rb in openwferu-0.9.10.653 vs lib/openwfe/expressions/fe_sleep.rb in openwferu-0.9.11

- old
+ new

@@ -135,16 +135,14 @@ "[re]schedule() " + "will sleep until '#{@awakening_time}' " + "(#{OpenWFE::to_iso8601_date(@awakening_time)})" end - if already_scheduled? - ldebug { "[re]schedule() already scheduled" } - return - end - - @scheduler_job_id = - scheduler.schedule_at(@awakening_time, self, nil) + @scheduler_job_id = "sleep_#{self.fei.to_s}" + + scheduler.schedule_at( + @awakening_time, + { :schedulable => self, :job_id => @scheduler_job_id }) ldebug do "[re]schedule() @scheduler_job_id is '#{@scheduler_job_id}' "+ " (scheduler #{scheduler.object_id})" end