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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c10c2e0e45143faac5f4730bc8d119e30562ed2f
4
- data.tar.gz: b1aa74a1fb3d738c2ba230dafd37f0cf40208f98
3
+ metadata.gz: a55f92b5e4b2de9fa2ebe212d4a3932461c45ec9
4
+ data.tar.gz: 3e2fb87988c43fc78ae3aca0a964c3f630c84e69
5
5
  SHA512:
6
- metadata.gz: f52189e4aea6a50d4172db359d0586111321a919e6a08e9968fc2e2f5caf3febf62cb00043f93b5631c58d0429254c3faffdb3930ea19cf83e785d535e9f3eee
7
- data.tar.gz: 4e91342dc0a0a2abe7cb69f5b49f265b8109b805f1e33d534aac9844570549860ba382c493ceb04b548ec6854a69eb2f17bdba37775cf0b44baca5132b4b0cc5
6
+ metadata.gz: 2d0ce774690a3ddb73d30bca2457c04283a977dadecbd22912726ad7726c4f6df218e12f4592a271fc869af114f7c5ab42fc11c8d21cfde6966a277ba90a0245
7
+ data.tar.gz: 14c65a1799a797b9f9cd5d3714a7971202fd7cdc1c1a6280661e9887a9414b106424f0a5fed1f71a8a3767bcc847d4894b8e72f8aacc7c8747e3f21fa6d11b09
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = "hirefire-resource"
5
- gem.version = "0.3.3"
5
+ gem.version = "0.3.4"
6
6
  gem.platform = Gem::Platform::RUBY
7
7
  gem.authors = "Michael van Rooijen"
8
8
  gem.email = "michael@hirefire.io"
@@ -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.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-23 00:00:00.000000000 Z
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.