health-monitor-rails 7.2.3 → 7.3.1

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
  SHA1:
3
- metadata.gz: 35d8a738ac261d7a66adf24a3b21d64838df675a
4
- data.tar.gz: 397056dc9308fb51f32dc413719708ae54019979
3
+ metadata.gz: 0c698297ece6c817cca14cdf047d7576933d68f2
4
+ data.tar.gz: 024b1a433db3fe3ac5b6a7a54cc316a2f5870fe3
5
5
  SHA512:
6
- metadata.gz: '029c9e64c93d5bf5b3db0bbbdd3670b8f4f09fc41f01e9dd20ad0ce0917f0d48fae8494b440e5b083cc65e7d1891fe0b8badcd9e073a97866fdad12092c31fe8'
7
- data.tar.gz: 4ee46b4c2bf84fd7bdc191376d2618c226017a4b5372c5492d23c3d83f084773f9b3608740591c399936ebc5800db8b28dfde878d54997ce12dd098f0fe74b53
6
+ metadata.gz: 72366f5c346f6fabb6bde9f89cc5b6ce8dec8d55bed144b2dc405bb27ad1d1d820d8712e1e6ebc2b85c0fb0b2e01ec3ee7eb38b891280c7d23f0c6ff1e1dcd63
7
+ data.tar.gz: d8e9aade1d886309b1a9d5a57c45d756144fe6cd626894ee98784a982dcddce7edebdb783a564ab354a9f4f004988f60ff3bba4929cdff115eae717a1a4d8a1b
data/Rakefile CHANGED
@@ -6,6 +6,6 @@ require 'rubocop/rake_task'
6
6
  RSpec::Core::RakeTask.new('spec')
7
7
  Bundler::GemHelper.install_tasks
8
8
 
9
- task :default => :spec
9
+ task default: :spec
10
10
 
11
11
  RuboCop::RakeTask.new
@@ -1,6 +1,6 @@
1
1
  module HealthMonitor
2
2
  class HealthController < ActionController::Base
3
- protect_from_forgery :with => :exception
3
+ protect_from_forgery with: :exception
4
4
 
5
5
  if Rails.version.starts_with? '3'
6
6
  before_filter :authenticate_with_basic_auth
@@ -1,8 +1,8 @@
1
- # rubocop:disable Style/FileName
1
+ # rubocop:disable Naming/FileName
2
2
 
3
3
  require 'health_monitor/version'
4
4
  require 'health_monitor/engine'
5
5
  require 'health_monitor/configuration'
6
6
  require 'health_monitor/monitor'
7
7
 
8
- # rubocop:enable Style/FileName
8
+ # rubocop:enable Naming/FileName
@@ -1,6 +1,6 @@
1
1
  module HealthMonitor
2
2
  class Configuration
3
- PROVIDERS = [:cache, :database, :redis, :resque, :sidekiq].freeze
3
+ PROVIDERS = %i[cache database redis resque sidekiq].freeze
4
4
 
5
5
  attr_accessor :error_callback, :basic_auth_credentials, :environment_variables
6
6
  attr_reader :providers
@@ -37,7 +37,7 @@ module HealthMonitor
37
37
  message: '',
38
38
  status: STATUSES[:ok]
39
39
  }
40
- rescue => e
40
+ rescue StandardError => e
41
41
  configuration.error_callback.call(e) if configuration.error_callback
42
42
 
43
43
  {
@@ -33,8 +33,7 @@ module HealthMonitor
33
33
  end
34
34
 
35
35
  # @abstract
36
- def self.configuration_class
37
- end
36
+ def self.configuration_class; end
38
37
  end
39
38
  end
40
39
  end
@@ -34,7 +34,7 @@ module HealthMonitor
34
34
  rescue Exception => e
35
35
  raise RedisException.new(e.message)
36
36
  ensure
37
- redis.client.disconnect
37
+ redis.close
38
38
  end
39
39
 
40
40
  private
@@ -18,6 +18,7 @@ module HealthMonitor
18
18
 
19
19
  def check!
20
20
  check_workers!
21
+ check_processes!
21
22
  check_latency!
22
23
  check_redis!
23
24
  rescue Exception => e
@@ -38,6 +39,13 @@ module HealthMonitor
38
39
  ::Sidekiq::Workers.new.size
39
40
  end
40
41
 
42
+ def check_processes!
43
+ sidekiq_stats = ::Sidekiq::Stats.new
44
+ return unless sidekiq_stats.processes_size.zero?
45
+
46
+ raise 'Sidekiq alive processes number is 0!'
47
+ end
48
+
41
49
  def check_latency!
42
50
  latency = ::Sidekiq::Queue.new.latency
43
51
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HealthMonitor
4
- VERSION = '7.2.3'.freeze
4
+ VERSION = '7.3.1'.freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: health-monitor-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.2.3
4
+ version: 7.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leonid Beder
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-22 00:00:00.000000000 Z
11
+ date: 2017-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '3.2'
19
+ version: '4.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '3.2'
26
+ version: '4.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: appraisal
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: sqlite3
42
+ name: capybara
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: rspec-rails
56
+ name: capybara-screenshot
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
@@ -67,7 +67,7 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: database_cleaner
70
+ name: coveralls
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ">="
@@ -81,7 +81,7 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: spork
84
+ name: database_cleaner
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
@@ -109,7 +109,7 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
- name: coveralls
112
+ name: rake
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="
@@ -123,7 +123,7 @@ dependencies:
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
- name: rake
126
+ name: rediska
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - ">="
@@ -137,35 +137,21 @@ dependencies:
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  - !ruby/object:Gem::Dependency
140
- name: rainbow
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - "~>"
144
- - !ruby/object:Gem::Version
145
- version: 2.1.0
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - "~>"
151
- - !ruby/object:Gem::Version
152
- version: 2.1.0
153
- - !ruby/object:Gem::Dependency
154
- name: rubocop
140
+ name: resque
155
141
  requirement: !ruby/object:Gem::Requirement
156
142
  requirements:
157
- - - "~>"
143
+ - - ">="
158
144
  - !ruby/object:Gem::Version
159
- version: 0.46.0
145
+ version: '0'
160
146
  type: :development
161
147
  prerelease: false
162
148
  version_requirements: !ruby/object:Gem::Requirement
163
149
  requirements:
164
- - - "~>"
150
+ - - ">="
165
151
  - !ruby/object:Gem::Version
166
- version: 0.46.0
152
+ version: '0'
167
153
  - !ruby/object:Gem::Dependency
168
- name: timecop
154
+ name: rspec-rails
169
155
  requirement: !ruby/object:Gem::Requirement
170
156
  requirements:
171
157
  - - ">="
@@ -179,7 +165,7 @@ dependencies:
179
165
  - !ruby/object:Gem::Version
180
166
  version: '0'
181
167
  - !ruby/object:Gem::Dependency
182
- name: rediska
168
+ name: rubocop
183
169
  requirement: !ruby/object:Gem::Requirement
184
170
  requirements:
185
171
  - - ">="
@@ -207,7 +193,7 @@ dependencies:
207
193
  - !ruby/object:Gem::Version
208
194
  version: '3.0'
209
195
  - !ruby/object:Gem::Dependency
210
- name: resque
196
+ name: spork
211
197
  requirement: !ruby/object:Gem::Requirement
212
198
  requirements:
213
199
  - - ">="
@@ -221,7 +207,7 @@ dependencies:
221
207
  - !ruby/object:Gem::Version
222
208
  version: '0'
223
209
  - !ruby/object:Gem::Dependency
224
- name: capybara
210
+ name: sqlite3
225
211
  requirement: !ruby/object:Gem::Requirement
226
212
  requirements:
227
213
  - - ">="
@@ -235,7 +221,7 @@ dependencies:
235
221
  - !ruby/object:Gem::Version
236
222
  version: '0'
237
223
  - !ruby/object:Gem::Dependency
238
- name: capybara-screenshot
224
+ name: timecop
239
225
  requirement: !ruby/object:Gem::Requirement
240
226
  requirements:
241
227
  - - ">="
@@ -292,7 +278,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
292
278
  version: '0'
293
279
  requirements: []
294
280
  rubyforge_project:
295
- rubygems_version: 2.6.12
281
+ rubygems_version: 2.6.14
296
282
  signing_key:
297
283
  specification_version: 4
298
284
  summary: Health monitoring Rails plug-in, which checks various services (db, cache,