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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7c5c0bb0fd736aaa1d20bdc0bb2211ba39e55e8652bc1d0e1532e9dec26ea38
4
- data.tar.gz: 3aca72349348c7ba01c994839a7a4d59674bcd0087d7ea6e08707fd9b4a1a9c6
3
+ metadata.gz: ffe703914e27914f16b7adb8785b6dce7a3b633196b06e11d5d31bec6ecfd749
4
+ data.tar.gz: 9d2bc7f8fb8a861b385b54f9361529640eaa2c9ea156fd47705efaf94042ca13
5
5
  SHA512:
6
- metadata.gz: 123d04789e7015e6a45dc1b0e701207dae4b655dc864d8b0bf1f101984ce3e4822e19b22acf39f2c918b7ae6a627470a5eec6d6be9cb09b84748ce3b5f249e5d
7
- data.tar.gz: b79af282afc336c17f216aa13c8dd5324faba3271a1ae8b57ae90bd0b6328d352180903cd68ac5fb9f9f4c6c82923e547cccea23930a8417813ae5db0a481cf2
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.4"
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.4
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-02-07 00:00:00.000000000 Z
13
+ date: 2024-04-26 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description:
16
16
  email: