judoscale-ruby 1.5.4 → 1.6.0
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/lib/judoscale/reporter.rb +0 -9
- data/lib/judoscale/version.rb +1 -1
- data/lib/judoscale-ruby.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f2abe20e81129ebfd711272ee0b76533612704e147444efbf7c50669945803ca
|
|
4
|
+
data.tar.gz: 49e29c1381f994cab33e9c68274426fcf8fe40486bffb4ce940d938da05b7352
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 444b5c9e06aec1b7c1ea802eea5c202cf32b078d168663e0431e023b498b13d490a4677bd5dba9876836adf228ede65fb60d50b985f8914b06fc652b94617ad5
|
|
7
|
+
data.tar.gz: 3bee505922145e6c185677794fc1934414b799f4389a5368fbe37d91af6ccc87dc4480a2657cf69eb46474a8e0167e648b4483040a856fa346aca39be906b59e
|
data/lib/judoscale/reporter.rb
CHANGED
|
@@ -72,26 +72,17 @@ module Judoscale
|
|
|
72
72
|
@_thread&.terminate
|
|
73
73
|
@_thread = nil
|
|
74
74
|
@pid = nil
|
|
75
|
-
@reported = false
|
|
76
75
|
end
|
|
77
76
|
|
|
78
77
|
private
|
|
79
78
|
|
|
80
79
|
def report(config, metrics)
|
|
81
|
-
# Make sure we report at least once, even if there are no metrics,
|
|
82
|
-
# so Judoscale knows the adapter is installed and running.
|
|
83
|
-
if @reported && metrics.empty?
|
|
84
|
-
logger.debug "No metrics to report - skipping"
|
|
85
|
-
return
|
|
86
|
-
end
|
|
87
|
-
|
|
88
80
|
report = Report.new(Judoscale.adapters, config, metrics)
|
|
89
81
|
logger.info "Reporting #{report.metrics.size} metrics"
|
|
90
82
|
result = AdapterApi.new(config).report_metrics(report.as_json)
|
|
91
83
|
|
|
92
84
|
case result
|
|
93
85
|
when AdapterApi::SuccessResponse
|
|
94
|
-
@reported = true
|
|
95
86
|
logger.debug "Reported successfully"
|
|
96
87
|
when AdapterApi::FailureResponse
|
|
97
88
|
logger.error "Reporter failed: #{result.failure_message}"
|
data/lib/judoscale/version.rb
CHANGED
data/lib/judoscale-ruby.rb
CHANGED
|
@@ -4,7 +4,7 @@ require "judoscale/config"
|
|
|
4
4
|
require "judoscale/version"
|
|
5
5
|
|
|
6
6
|
module Judoscale
|
|
7
|
-
# Allows configuring
|
|
7
|
+
# Allows configuring Judoscale through a block, usually defined during application initialization.
|
|
8
8
|
#
|
|
9
9
|
# Example:
|
|
10
10
|
#
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: judoscale-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Adam McCrea
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2024-
|
|
13
|
+
date: 2024-04-26 00:00:00.000000000 Z
|
|
14
14
|
dependencies: []
|
|
15
15
|
description:
|
|
16
16
|
email:
|