hirefire-resource 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/hirefire-resource.gemspec +1 -1
- data/lib/hirefire/macro/delayed_job.rb +6 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a55f92b5e4b2de9fa2ebe212d4a3932461c45ec9
|
4
|
+
data.tar.gz: 3e2fb87988c43fc78ae3aca0a964c3f630c84e69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d0ce774690a3ddb73d30bca2457c04283a977dadecbd22912726ad7726c4f6df218e12f4592a271fc869af114f7c5ab42fc11c8d21cfde6966a277ba90a0245
|
7
|
+
data.tar.gz: 14c65a1799a797b9f9cd5d3714a7971202fd7cdc1c1a6280661e9887a9414b106424f0a5fed1f71a8a3767bcc847d4894b8e72f8aacc7c8747e3f21fa6d11b09
|
data/hirefire-resource.gemspec
CHANGED
@@ -49,14 +49,18 @@ module HireFire
|
|
49
49
|
c = c.where("priority >= ?", options[:min_priority]) if options.key?(:min_priority)
|
50
50
|
c = c.where("priority <= ?", options[:max_priority]) if options.key?(:max_priority)
|
51
51
|
c = c.where(:queue => queues) unless queues.empty?
|
52
|
-
c.count
|
52
|
+
c.count.tap { ActiveRecord::Base.clear_active_connections! }
|
53
53
|
when :active_record_2
|
54
54
|
c = ::Delayed::Job
|
55
55
|
c = c.scoped(:conditions => ["run_at <= ? AND failed_at is NULL", Time.now.utc])
|
56
56
|
c = c.scoped(:conditions => ["priority >= ?", options[:min_priority]]) if options.key?(:min_priority)
|
57
57
|
c = c.scoped(:conditions => ["priority <= ?", options[:max_priority]]) if options.key?(:max_priority)
|
58
58
|
# There is no queue column in delayed_job <= 2.x
|
59
|
-
c.count
|
59
|
+
c.count.tap do
|
60
|
+
if ActiveRecord::Base.respond_to?(:clear_active_connections!)
|
61
|
+
ActiveRecord::Base.clear_active_connections!
|
62
|
+
end
|
63
|
+
end
|
60
64
|
when :mongoid
|
61
65
|
c = ::Delayed::Job
|
62
66
|
c = c.where(:failed_at => nil)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hirefire-resource
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael van Rooijen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07
|
11
|
+
date: 2014-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: HireFire enables you to auto-scale your dynos, schedule capacity during
|
14
14
|
specific times of the week, and recover crashed processes.
|