http_health_check 0.4.0 → 0.5.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: 1ae08f694494aa01e0667a635ae85163e9d675da9a8e97bb1ad9194296c113d0
4
- data.tar.gz: 44b3ae8a18369eaf1da10c9ba7283272a395f2afda8fe6e964cc2fc1643e2bc5
3
+ metadata.gz: fe6031466ea56c2d002940f78153ae48ace1db21fdca05deac22a0db3ce94b1f
4
+ data.tar.gz: 6fc203cedf7f1a230651dca1fb6843fb96c5faeb4c1c3fa7d6a3225ea74215bf
5
5
  SHA512:
6
- metadata.gz: '069a950fe9727f24980ad7b38014d73369a7963796606c2d3fddfdfa13da3e710776ba24174dfc9d511175a65d05aa40b6b3f5d15aba3c53380f84a088af3309'
7
- data.tar.gz: b149e9ae46abbcc0131f652135e19aca4e747adaa3f39913457a0e768f38b1b697fd470ffc1bc6e2eee952b847bf8359a1653d699a34f41cf8f0e44c9a76a6fb
6
+ metadata.gz: d03662d8504a522417506da75186369e283eabb8a530a7ca7d57c0e89f15e5904ff78c92b19f34f6744d0d8b9c66977f5716e639b1a68358af07afd6f9f9e99f
7
+ data.tar.gz: 516019244efc6596266b887382bfb72e2a047674c30386fae8a15969a11673249f2dfd9673e0cfbcecfbc6dc93a8bc7f3823b8a4b1662e4c92619aadd6a02d14
data/.bumpversion.cfg CHANGED
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 0.4.0
2
+ current_version = 0.4.1
3
3
  commit = True
4
4
  tag = True
5
5
  tag_name = {new_version}
data/.tool-versions CHANGED
@@ -1 +1 @@
1
- ruby 2.5.8
1
+ ruby 3.2.0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # CHANGELOG.md
2
2
 
3
+ ## 0.5.0 (2023-08-16)
4
+
5
+ Features:
6
+
7
+ - Add Sidekiq 6+ support [PR#4](https://github.com/SberMarket-Tech/http_health_check/pull/4)
8
+
9
+ ## 0.4.1 (2022-08-05)
10
+
11
+ Fix:
12
+
13
+ - Fix DelayedJob probe [PR#2](https://github.com/SberMarket-Tech/http_health_check/pull/2)
14
+
3
15
  ## 0.4.0 (2022-07-20)
4
16
 
5
17
  Features:
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- http_health_check (0.4.0)
4
+ http_health_check (0.4.1)
5
5
  rack (~> 2.0)
6
6
  webrick
7
7
 
@@ -15,6 +15,7 @@ GEM
15
15
  tzinfo (~> 1.1)
16
16
  ast (2.4.2)
17
17
  concurrent-ruby (1.1.10)
18
+ connection_pool (2.4.1)
18
19
  diff-lcs (1.5.0)
19
20
  docile (1.4.0)
20
21
  dotenv (2.7.6)
@@ -28,6 +29,8 @@ GEM
28
29
  rainbow (3.1.1)
29
30
  rake (13.0.6)
30
31
  redis (4.2.5)
32
+ redis-client (0.15.0)
33
+ connection_pool
31
34
  regexp_parser (2.5.0)
32
35
  rexml (3.2.5)
33
36
  rspec (3.11.0)
@@ -84,6 +87,7 @@ DEPENDENCIES
84
87
  http_health_check!
85
88
  rake (~> 13.0)
86
89
  redis (~> 4.2.5)
90
+ redis-client (~> 0.15.0)
87
91
  rspec (~> 3.2)
88
92
  rspec_junit_formatter
89
93
  rubocop (~> 0.81)
data/README.md CHANGED
@@ -11,7 +11,7 @@ HttpHealthCheck is built with kubernetes health probes in mind, but it can be us
11
11
  Add this line to your application's Gemfile:
12
12
 
13
13
  ```ruby
14
- gem 'http_health_check', '~> 0.4.0'
14
+ gem 'http_health_check', '~> 0.4.1'
15
15
  ```
16
16
 
17
17
  And then execute:
@@ -203,7 +203,7 @@ Be aware that this approach does not cover issues with sidekiq being stuck proce
203
203
 
204
204
  ```ruby
205
205
  HttpHealthCheck.configure do |config|
206
- config.probe '/readiness/delayed_job', HttpHealthCheck::Probes::Sidekiq.new
206
+ config.probe '/readiness/sidekiq', HttpHealthCheck::Probes::Sidekiq.new
207
207
  end
208
208
  ```
209
209
 
@@ -33,6 +33,7 @@ Gem::Specification.new do |spec|
33
33
  spec.add_development_dependency 'activesupport', '~> 5.0'
34
34
  spec.add_development_dependency 'dotenv', '~> 2.7.6'
35
35
  spec.add_development_dependency 'redis', '~> 4.2.5'
36
+ spec.add_development_dependency 'redis-client', '~> 0.15.0'
36
37
  spec.add_development_dependency 'rspec', '~> 3.2'
37
38
  spec.add_development_dependency 'rubocop', '~> 0.81'
38
39
  spec.add_development_dependency 'thor', '>= 0.20'
@@ -17,6 +17,7 @@ module HttpHealthCheck
17
17
  end
18
18
 
19
19
  def probe(_env)
20
+ @delayed_job.where(queue: HealthCheckJob.queue_name).each(&:destroy!)
20
21
  @delayed_job.enqueue(HealthCheckJob).destroy!
21
22
  probe_ok
22
23
  end
@@ -14,7 +14,7 @@ module HttpHealthCheck
14
14
 
15
15
  def probe(_env)
16
16
  @sidekiq_module.redis do |conn|
17
- conn.setex(meta[:redis_key], TTL_SEC, MAGIC_NUMBER)
17
+ conn.call('SET', meta[:redis_key], MAGIC_NUMBER, 'EX', TTL_SEC)
18
18
  probe_ok
19
19
  end
20
20
  end
@@ -10,7 +10,7 @@ module HttpHealthCheck
10
10
  # @param karafka_app descendant of Karafka::App
11
11
  def self.consumer_groups(karafka_app, program_name: $PROGRAM_NAME, argv: ARGV) # rubocop:disable Metrics/AbcSize
12
12
  all_groups = karafka_app.consumer_groups.map(&:id)
13
- client_id_prefix = karafka_app.config.client_id.gsub('-', '_') + '_'
13
+ client_id_prefix = "#{karafka_app.config.client_id.gsub('-', '_')}_"
14
14
 
15
15
  return all_groups if program_name.split('/').last != 'karafka'
16
16
  return all_groups if argv[0] != 'server'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HttpHealthCheck
4
- VERSION = '0.4.0'
4
+ VERSION = '0.5.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http_health_check
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - SberMarket team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-07-20 00:00:00.000000000 Z
11
+ date: 2023-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 4.2.5
83
+ - !ruby/object:Gem::Dependency
84
+ name: redis-client
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 0.15.0
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 0.15.0
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: rspec
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -181,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
181
195
  - !ruby/object:Gem::Version
182
196
  version: '0'
183
197
  requirements: []
184
- rubygems_version: 3.2.3
198
+ rubygems_version: 3.4.1
185
199
  signing_key:
186
200
  specification_version: 4
187
201
  summary: Simple and extensible HTTP health checks server.