hirefire 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,20 +0,0 @@
1
- # encoding: utf-8
2
-
3
- module HireFire
4
- module Backend
5
- module ActiveRecord
6
-
7
- ##
8
- # Counts the amount of queued jobs in the database,
9
- # failed jobs are excluded from the sum
10
- #
11
- # @return [Fixnum]
12
- def jobs
13
- Delayed::Job.
14
- where(:failed_at => nil).
15
- where('run_at <= ?', Time.now).count
16
- end
17
-
18
- end
19
- end
20
- end
@@ -1,21 +0,0 @@
1
- # encoding: utf-8
2
-
3
- module HireFire
4
- module Backend
5
- module Mongoid
6
-
7
- ##
8
- # Counts the amount of queued jobs in the database,
9
- # failed jobs and jobs scheduled for the future are excluded
10
- #
11
- # @return [Fixnum]
12
- def jobs
13
- Delayed::Job.where(
14
- :failed_at => nil,
15
- :run_at.lte => Time.now
16
- ).count
17
- end
18
-
19
- end
20
- end
21
- end