hirefire-resource 0.7.2 → 0.7.3

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
  SHA256:
3
- metadata.gz: 14b05a951639660419ec0e420647752fef4b8e33ad615c0b4706cc70a9ceab87
4
- data.tar.gz: 2567a0a3a2d287d220d80f085b835093b845989969484c4ed1a13460ef07ee2b
3
+ metadata.gz: 36cd4a0814e19db1108226ae96b3c45ecad0a34554ce7373d7d30d7f662e2f3f
4
+ data.tar.gz: f0d2ea85ac01ca75761ac19702f04fa123beddd0eb4685219196656d1229c2d8
5
5
  SHA512:
6
- metadata.gz: 66fa48f86bf1377cb4ce1aa93e460621255a0f4802004d8ed3ba35ecb2fd59bfd86aa980589d9d6f4c6d69e5070195c7214c90858bb1f261dab799691e5ae643
7
- data.tar.gz: ace370aec4f4e8c60d0caa521b996917a3eaee8598a5515219c00e07335a7b211dad9f962bf3b9ae0fb618520ec565c6fc0802a12243f1977d7719c83682f4f4
6
+ metadata.gz: 57fbf0cd4f9235a99202281f81bb141006b12e816be31ff2d3fc4686c67dd49f7e37f90caeaa22c98b55b93dd2c95d718c09495978cb1165b903a4c654d3f842
7
+ data.tar.gz: e3a8649ee7bad06d046b2b4c787a531176e90deaa8f5b193254b7f6bdb541f8923c245ca336f22c68f205de9aa10e95d43800fe8a536be1dc4a8db44ace7c6e4
data/CHANGELOG.md ADDED
@@ -0,0 +1,19 @@
1
+ ## v0.7.3/Master
2
+
3
+ * Added priority queue support for bunny message count.
4
+ * Allows for passing in the `x-max-priority` option when opening up a queue to check the messages remaining.
5
+ * Usage: `HireFire::Macro::Bunny.queue(queue, amqp_url: url, "x-max-priority": 10 )`
6
+
7
+ ## v0.7.2
8
+
9
+ * Changed Que macro to query take into account scheduled jobs.
10
+
11
+ ## v0.7.1
12
+
13
+ * Made entire library threadsafe.
14
+
15
+ ## v0.7.0
16
+
17
+ * Made `HireFire::Resource.log_queue_metrics` optional. This is now disabled by default.
18
+ * Enable by setting `log_queue_metrics = true`.
19
+ * Required when using the `Manager::Web::Logplex::QueueTime` autoscaling strategy.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = "hirefire-resource"
5
- gem.version = "0.7.2"
5
+ gem.version = "0.7.3"
6
6
  gem.platform = Gem::Platform::RUBY
7
7
  gem.authors = "Michael van Rooijen"
8
8
  gem.email = "michael@hirefire.io"
@@ -70,11 +70,15 @@ module HireFire
70
70
 
71
71
  def count_messages(channel, queue_names, options)
72
72
  queue_names.inject(0) do |sum, queue_name|
73
- queue = channel.queue(queue_name, :durable => options[:durable])
73
+ if options.key?("x-max-priority")
74
+ queue = channel.queue(queue_name, :durable => options[:durable],
75
+ :arguments => {"x-max-priority" => options["x-max-priority"]})
76
+ else
77
+ queue = channel.queue(queue_name, :durable => options[:durable])
78
+ end
74
79
  sum + queue.message_count
75
80
  end
76
81
  end
77
82
  end
78
83
  end
79
84
  end
80
-
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.7.2
4
+ version: 0.7.3
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: 2019-07-13 00:00:00.000000000 Z
11
+ date: 2019-11-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Load- and schedule-based scaling for web- and worker dynos
14
14
  email: michael@hirefire.io
@@ -19,6 +19,7 @@ extensions: []
19
19
  extra_rdoc_files: []
20
20
  files:
21
21
  - ".gitignore"
22
+ - CHANGELOG.md
22
23
  - LICENSE
23
24
  - README.md
24
25
  - Rakefile