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 +4 -4
- data/CHANGELOG.md +19 -0
- data/hirefire-resource.gemspec +1 -1
- data/lib/hirefire/macro/bunny.rb +6 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36cd4a0814e19db1108226ae96b3c45ecad0a34554ce7373d7d30d7f662e2f3f
|
4
|
+
data.tar.gz: f0d2ea85ac01ca75761ac19702f04fa123beddd0eb4685219196656d1229c2d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
data/hirefire-resource.gemspec
CHANGED
data/lib/hirefire/macro/bunny.rb
CHANGED
@@ -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
|
-
|
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.
|
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-
|
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
|