puma-cloudwatch 0.5.0 → 0.5.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 310c3534fa2d00a6da76f26f6cbe908ac842ced68f02d49fb0ff4f7d0922e95b
4
- data.tar.gz: 0ef2173e64a9517866be68af190256529184f40aacb6830c0f93960203dc2919
3
+ metadata.gz: 599b6819f8b72237a6fee5a64c7e0f9060da208b80291a24f5bf3b3b7cf93eef
4
+ data.tar.gz: e53f1ff64f41be6c3349a8d8a009ab7ccebcfec0d82c1b2f03fd318338250d15
5
5
  SHA512:
6
- metadata.gz: 44a1e9b69e28968779ed60237c102a21e8d1bb3729a6ee5f013932efab906f00f723694b004e585f6b285db6ffadd2f1c1c935ba4d2a0eaff78fbf434ef52604
7
- data.tar.gz: 21f44b53b79331912008bec96ac4c27b3903d16d21f79ae22ee4259ae8a8ba25fa16d79b5d4724ac9be2818097743ccc9abb65a209a344b502c32747626ef019
6
+ metadata.gz: 4f1dca7162a90b61399dda3b6ca7b3807ef95323be856c7ac9c74a94b70c14c65e8aaa6bca18b092c85ae4fce5c3ef8e71027a2ca39a02f774b41a8f5143fe38
7
+ data.tar.gz: 29d39a09ce1e5ff472ba549fd20356f7ae7e2826aab2d40ce2471b4d5f7d54e757d88c2f689dea637127439504fcc11a1d8dadbe5b793caffa0463a2fd68ff20
data/CHANGELOG.md CHANGED
@@ -3,6 +3,9 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *loosely tries* to adhere to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## [0.5.1] - 2023-11-13
7
+ - [#13](https://github.com/tongueroo/puma-cloudwatch/pull/13) delay error messages until first successful fetch
8
+
6
9
  ## [0.5.0] - 2023-07-11
7
10
  - [#11](https://github.com/tongueroo/puma-cloudwatch/pull/11) Added support for PUMA_CLOUDWATCH_AWS_ACCESS_KEY_ID and PUMA_CLOUDWATCH_AWS_SECRET_ACCESS_KEY env vars to configure an AWS access key
8
11
  - [#12](https://github.com/tongueroo/puma-cloudwatch/pull/12) http tcp port support also
@@ -10,6 +10,7 @@ class PumaCloudwatch::Metrics
10
10
  @control_auth_token = options[:control_auth_token]
11
11
  @frequency = Integer(ENV['PUMA_CLOUDWATCH_FREQUENCY'] || 60)
12
12
  @enabled = ENV['PUMA_CLOUDWATCH_ENABLED'] || false
13
+ @fetched = false
13
14
  end
14
15
 
15
16
  def run
@@ -34,11 +35,17 @@ class PumaCloudwatch::Metrics
34
35
  loop do
35
36
  begin
36
37
  stats = Fetcher.new(@options).call
38
+ @fetched = true
37
39
  results = Parser.new(stats).call
38
40
  Sender.new(results).call unless results.empty?
39
41
  sleep @frequency
40
42
  rescue Exception => e
41
- puts "Error reached top of looper: #{e.message} (#{e.class})"
43
+ if @fetched
44
+ puts "Error reached top of looper: #{e.message} (#{e.class})"
45
+ else
46
+ # sleep and don't error until we've successfully fetched
47
+ sleep @frequency
48
+ end
42
49
  end
43
50
  end
44
51
  end
@@ -1,3 +1,3 @@
1
1
  module PumaCloudwatch
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puma-cloudwatch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-07-11 00:00:00.000000000 Z
11
+ date: 2023-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-cloudwatch
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  - !ruby/object:Gem::Version
115
115
  version: '0'
116
116
  requirements: []
117
- rubygems_version: 3.4.10
117
+ rubygems_version: 3.4.20
118
118
  signing_key:
119
119
  specification_version: 4
120
120
  summary: Puma plugin sends puma stats to CloudWatch