lib/rufus/sc/scheduler.rb in rufus-scheduler-2.0.14 vs lib/rufus/sc/scheduler.rb in rufus-scheduler-2.0.15

- old
+ new

@@ -311,11 +311,21 @@ # the execution of jobs. # def trigger_threads Thread.list.select { |t| - t["rufus_scheduler__trigger_thread__#{self.object_id}"] == true + t["rufus_scheduler__trigger_thread__#{self.object_id}"] } + end + + # Returns the list of the currently running jobs (jobs that just got + # triggered and are executing). + # + def running_jobs + + Thread.list.collect { |t| + t["rufus_scheduler__trigger_thread__#{self.object_id}"] + }.compact end protected # Returns a job queue instance.