middle_management 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -45,7 +45,7 @@ module MiddleManagement
|
|
45
45
|
cattr_accessor :current_jobs_count_last_queried
|
46
46
|
|
47
47
|
def self.current_jobs_count
|
48
|
-
if @@current_jobs_count.nil? || self.current_jobs_count_last_queried.nil? || self.current_jobs_count_last_queried < 1.minute.ago
|
48
|
+
if @@current_jobs_count.nil? || @@current_jobs_count == 0 || self.current_jobs_count_last_queried.nil? || self.current_jobs_count_last_queried < 1.minute.ago
|
49
49
|
self.current_jobs_count = Delayed::Backend::ActiveRecord::Job.where("run_at <= ? AND failed_at IS NULL AND locked_by IS NULL", Delayed::Backend::ActiveRecord::Job.db_time_now).count
|
50
50
|
self.current_jobs_count_last_queried = Time.now
|
51
51
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middle_management
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 2
|
10
|
+
version: 1.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Robby Grossman
|