hirefire-resource 0.7.3 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/hirefire-resource.gemspec +1 -1
- data/lib/hirefire/macro/bunny.rb +2 -2
- data/lib/hirefire/middleware.rb +4 -4
- data/lib/hirefire/resource.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0f27c2bce684da854821e548240133957ec7ceb4723a909e59b07d90309c1581
|
|
4
|
+
data.tar.gz: 22d7df5921dee7c79b0655bb5515b0242c52ca8dab659811e1569e1b372bb8b9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fd2aeca7665ccf846ab9f23cba0fd0db16b993b60c91c62e57ec88dfadad50bb06b2db6395cd5e54506d0a79b568472cffdfebb13f93f0a9f592e719693c0d9c
|
|
7
|
+
data.tar.gz: 3e6bef9dead3feb4848c3bf448a049572c2671840e5487ac0ab37e79abf2f1716a5d53018055fb3d9715626112d47132e54e9db456bf0f2ab6fe60523302dbb2
|
data/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
## v0.7.
|
|
1
|
+
## v0.7.4/Master
|
|
2
|
+
|
|
3
|
+
* Attempt to fix an issue where the STDOUT IO Stream has been closed for an unknown reason.
|
|
4
|
+
* This resulted in errors in an application with `log_queue_metrics` enabled after a random period of time.
|
|
5
|
+
|
|
6
|
+
## v0.7.3
|
|
2
7
|
|
|
3
8
|
* Added priority queue support for bunny message count.
|
|
4
9
|
* Allows for passing in the `x-max-priority` option when opening up a queue to check the messages remaining.
|
data/hirefire-resource.gemspec
CHANGED
data/lib/hirefire/macro/bunny.rb
CHANGED
|
@@ -70,9 +70,9 @@ module HireFire
|
|
|
70
70
|
|
|
71
71
|
def count_messages(channel, queue_names, options)
|
|
72
72
|
queue_names.inject(0) do |sum, queue_name|
|
|
73
|
-
if options.key?(
|
|
73
|
+
if options.key?(:'x-max-priority')
|
|
74
74
|
queue = channel.queue(queue_name, :durable => options[:durable],
|
|
75
|
-
:arguments => {"x-max-priority" => options[
|
|
75
|
+
:arguments => {"x-max-priority" => options[:'x-max-priority']})
|
|
76
76
|
else
|
|
77
77
|
queue = channel.queue(queue_name, :durable => options[:durable])
|
|
78
78
|
end
|
data/lib/hirefire/middleware.rb
CHANGED
|
@@ -19,7 +19,7 @@ module HireFire
|
|
|
19
19
|
#
|
|
20
20
|
# When HireFire::Resource.log_queue_metrics is enabled, and the HTTP_X_REQUEST_START
|
|
21
21
|
# header has been injected at the Heroku Router layer, queue time information will be
|
|
22
|
-
# logged to
|
|
22
|
+
# logged to $stdout. This data can be used by the HireFire Logdrain with the
|
|
23
23
|
# Web.Logplex.QueueTime autoscaling strategy.
|
|
24
24
|
#
|
|
25
25
|
# Important: Don't set/update instance variables within this- or any underlying methods.
|
|
@@ -103,7 +103,7 @@ module HireFire
|
|
|
103
103
|
[status, headers, [body]]
|
|
104
104
|
end
|
|
105
105
|
|
|
106
|
-
# Writes the Heroku Router queue time to
|
|
106
|
+
# Writes the Heroku Router queue time to $stdout if a String was provided.
|
|
107
107
|
#
|
|
108
108
|
# @param [String] the timestamp from HTTP_X_REQUEST_START.
|
|
109
109
|
#
|
|
@@ -111,12 +111,12 @@ module HireFire
|
|
|
111
111
|
HireFire::Resource.log_queue_metrics && value && log_queue(value)
|
|
112
112
|
end
|
|
113
113
|
|
|
114
|
-
# Writes the Heroku Router queue time to
|
|
114
|
+
# Writes the Heroku Router queue time to $stdout.
|
|
115
115
|
#
|
|
116
116
|
# @param [String] the timestamp from HTTP_X_REQUEST_START.
|
|
117
117
|
#
|
|
118
118
|
def log_queue(value)
|
|
119
|
-
|
|
119
|
+
puts("[hirefire:router] queue=#{get_queue(value)}ms")
|
|
120
120
|
end
|
|
121
121
|
|
|
122
122
|
# Calculates the difference, in milliseconds, between the
|
data/lib/hirefire/resource.rb
CHANGED
|
@@ -4,7 +4,7 @@ module HireFire
|
|
|
4
4
|
module Resource
|
|
5
5
|
extend self
|
|
6
6
|
|
|
7
|
-
# This option, when enabled, will write queue metrics to
|
|
7
|
+
# This option, when enabled, will write queue metrics to $stdout,
|
|
8
8
|
# and is only required when using the Web.Logplex.QueueTime strategy.
|
|
9
9
|
#
|
|
10
10
|
# @param [Boolean] Whether or not the queue metrics should be logged.
|
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.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:
|
|
11
|
+
date: 2020-01-29 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
|
|
@@ -57,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
57
57
|
- !ruby/object:Gem::Version
|
|
58
58
|
version: '0'
|
|
59
59
|
requirements: []
|
|
60
|
-
rubygems_version: 3.
|
|
60
|
+
rubygems_version: 3.1.2
|
|
61
61
|
signing_key:
|
|
62
62
|
specification_version: 4
|
|
63
63
|
summary: Autoscaling for your Heroku dynos
|