hirefire 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -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