hirefire-resource 0.7.3 → 0.7.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
  SHA256:
3
- metadata.gz: 36cd4a0814e19db1108226ae96b3c45ecad0a34554ce7373d7d30d7f662e2f3f
4
- data.tar.gz: f0d2ea85ac01ca75761ac19702f04fa123beddd0eb4685219196656d1229c2d8
3
+ metadata.gz: 0f27c2bce684da854821e548240133957ec7ceb4723a909e59b07d90309c1581
4
+ data.tar.gz: 22d7df5921dee7c79b0655bb5515b0242c52ca8dab659811e1569e1b372bb8b9
5
5
  SHA512:
6
- metadata.gz: 57fbf0cd4f9235a99202281f81bb141006b12e816be31ff2d3fc4686c67dd49f7e37f90caeaa22c98b55b93dd2c95d718c09495978cb1165b903a4c654d3f842
7
- data.tar.gz: e3a8649ee7bad06d046b2b4c787a531176e90deaa8f5b193254b7f6bdb541f8923c245ca336f22c68f205de9aa10e95d43800fe8a536be1dc4a8db44ace7c6e4
6
+ metadata.gz: fd2aeca7665ccf846ab9f23cba0fd0db16b993b60c91c62e57ec88dfadad50bb06b2db6395cd5e54506d0a79b568472cffdfebb13f93f0a9f592e719693c0d9c
7
+ data.tar.gz: 3e6bef9dead3feb4848c3bf448a049572c2671840e5487ac0ab37e79abf2f1716a5d53018055fb3d9715626112d47132e54e9db456bf0f2ab6fe60523302dbb2
data/CHANGELOG.md CHANGED
@@ -1,4 +1,9 @@
1
- ## v0.7.3/Master
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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = "hirefire-resource"
5
- gem.version = "0.7.3"
5
+ gem.version = "0.7.4"
6
6
  gem.platform = Gem::Platform::RUBY
7
7
  gem.authors = "Michael van Rooijen"
8
8
  gem.email = "michael@hirefire.io"
@@ -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?("x-max-priority")
73
+ if options.key?(:'x-max-priority')
74
74
  queue = channel.queue(queue_name, :durable => options[:durable],
75
- :arguments => {"x-max-priority" => options["x-max-priority"]})
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
@@ -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 STDOUT. This data can be used by the HireFire Logdrain with the
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 STDOUT if a String was provided.
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 STDOUT.
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
- STDOUT.puts("[hirefire:router] queue=#{get_queue(value)}ms")
119
+ puts("[hirefire:router] queue=#{get_queue(value)}ms")
120
120
  end
121
121
 
122
122
  # Calculates the difference, in milliseconds, between the
@@ -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 STDOUT,
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.3
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: 2019-11-20 00:00:00.000000000 Z
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.0.3
60
+ rubygems_version: 3.1.2
61
61
  signing_key:
62
62
  specification_version: 4
63
63
  summary: Autoscaling for your Heroku dynos