lib/openwfe/util/scheduler.rb in openwferu-0.9.3 vs lib/openwfe/util/scheduler.rb in openwferu-0.9.4
- old
+ new
@@ -304,9 +304,23 @@
end
return nil
end
+ #
+ # Returns the number of currently pending jobs in this scheduler.
+ #
+ def pending_job_count
+ @pending_jobs.size
+ end
+
+ #
+ # Returns the number of cron jobs currently active in this scheduler.
+ #
+ def cron_job_count
+ @cron_entries.size
+ end
+
protected
def to_block (schedulable, params, &block)
if schedulable
lambda do