rails-autoscale-core 1.5.4 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- 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: ffe703914e27914f16b7adb8785b6dce7a3b633196b06e11d5d31bec6ecfd749
|
4
|
+
data.tar.gz: 9d2bc7f8fb8a861b385b54f9361529640eaa2c9ea156fd47705efaf94042ca13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e424ce46d5a9e57ffd61a75da78b0934dbcccb792c14a478a90f306f7c83ae7f769ecd067c42c27aa7a3e94e32b646ed63c2d25bdbe22b59cda006d5a108fd23
|
7
|
+
data.tar.gz: f471203da9485fd7502d696ed97029b7e39329e9020566b7a9773935b9ca76e861db631e947fbbae1c571e5f40de2270a2ad8d5e985d1706fe167ab5200be48c
|
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: rails-autoscale-core
|
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:
|