rails-autoscale-core 1.5.3 → 1.6.0

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: ecb527ab4d6f7a97247bd1aa47424414ea57ef62eaea688e24674820d9c20e8b
4
- data.tar.gz: d1fa82cb48feb2fe4dd8136647b51d83a439632a19cc14f2cc6114d2e3677a54
3
+ metadata.gz: ffe703914e27914f16b7adb8785b6dce7a3b633196b06e11d5d31bec6ecfd749
4
+ data.tar.gz: 9d2bc7f8fb8a861b385b54f9361529640eaa2c9ea156fd47705efaf94042ca13
5
5
  SHA512:
6
- metadata.gz: 4f4403334de767802741291af1799bfa1f0f911e002d89a6f8d9e82465da3e1bef724aa75196fd09e25342fa43e66e516852463e8c8e4063eab526d597605f61
7
- data.tar.gz: d3f82c8c7387ff7627c30b70571c72bca3f4c8d000933e5917a595b6cb6a7a20827f52c1fe4ad9b55d343907085710e59ac21426bfea9a241ecd63b2899e5df1
6
+ metadata.gz: e424ce46d5a9e57ffd61a75da78b0934dbcccb792c14a478a90f306f7c83ae7f769ecd067c42c27aa7a3e94e32b646ed63c2d25bdbe22b59cda006d5a108fd23
7
+ data.tar.gz: f471203da9485fd7502d696ed97029b7e39329e9020566b7a9773935b9ca76e861db631e947fbbae1c571e5f40de2270a2ad8d5e985d1706fe167ab5200be48c
@@ -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}"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Judoscale
4
- VERSION = "1.5.3"
4
+ VERSION = "1.6.0"
5
5
  end
@@ -4,7 +4,7 @@ require "judoscale/config"
4
4
  require "judoscale/version"
5
5
 
6
6
  module Judoscale
7
- # Allows configuring Rails Autoscale through a block, usually defined during application initialization.
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.5.3
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-01-25 00:00:00.000000000 Z
13
+ date: 2024-04-26 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description:
16
16
  email: