sidekiq_alive 2.1.2 → 2.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '08d38ee6866d0c487f93b13d5c4fc64d70d5775efbf29e1c44e3e6d0a968ec0c'
4
- data.tar.gz: 2d5955184dd20b771897edf42f23471023faa95ed19ffea0850ef9ca086d7193
3
+ metadata.gz: 2f200ab5c4b5282e98520a57e341fdc98d73d971abca9931c96135dd07b505d0
4
+ data.tar.gz: 7eca663e0264246ff8a285a166233054ea01b446b526fccd9dc1382c1acbf493
5
5
  SHA512:
6
- metadata.gz: c9e8b6b12990a57f4075b7e8b79d8006c399240e0d17fb678437bf6fc8798164502761f3920543ca351a2248bcd1cefc57e0bf9d105da951b1942fd78a440dad
7
- data.tar.gz: a0bbe436f1ca6e2601d2dd3daa7f321c6ddbcf6e69f51b3a222daedeb8c2f4b3b5bffde590b68ffcba43a179877d5694459ea7bf5cf9cef295fed27164d378d7
6
+ metadata.gz: bcc7753c96ef6c364f660b6ec5ab0c9a0540d77d2ba962666a090b94bec5eca59d722123122db4715f7604144bab13398034414890eb6100a45baa3d1db5070e
7
+ data.tar.gz: 16d277c8cbe259be7ad38e66e2f359c29a293f6cf399783305a243ab061c63e8c7cfe7fb2f7ad7944473ba7cabea8e37e332630b30a56a956682d9a1cdaaf2bd
@@ -18,7 +18,7 @@ jobs:
18
18
  runs-on: ubuntu-latest
19
19
  strategy:
20
20
  matrix:
21
- ruby-version: ["2.6", "2.7", "3.0"]
21
+ ruby-version: ["2.6", "2.7", "3.0", "3.1"]
22
22
  services:
23
23
  # Label used to access the service container
24
24
  redis:
@@ -40,7 +40,7 @@ jobs:
40
40
  # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
41
41
  # change this to (see https://github.com/ruby/setup-ruby#versioning):
42
42
  # uses: ruby/setup-ruby@v1
43
- uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
43
+ uses: ruby/setup-ruby@v1
44
44
  with:
45
45
  ruby-version: ${{ matrix.ruby-version }}
46
46
  bundler-cache: true # runs 'bundle install' and caches installed gems automatically
@@ -0,0 +1,41 @@
1
+ name: Ruby CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+
13
+ strategy:
14
+ matrix:
15
+ ruby-version: [3.0.x, 2.7.x, 2.6.x, 2.5.x]
16
+ # Service containers to run with `runner-job`
17
+ services:
18
+ # Label used to access the service container
19
+ redis:
20
+ # Docker Hub image
21
+ image: redis
22
+ # Set health checks to wait until redis has started
23
+ options: >-
24
+ --health-cmd "redis-cli ping"
25
+ --health-interval 10s
26
+ --health-timeout 5s
27
+ --health-retries 5
28
+ ports:
29
+ # Maps port 6379 on service container to the host
30
+ - 6379:6379
31
+
32
+ steps:
33
+ - uses: actions/checkout@v2
34
+ - name: Set up Ruby ${{ matrix.ruby-version }}
35
+ uses: ruby/setup-ruby@v1
36
+ with:
37
+ ruby-version: ${{ matrix.ruby-version }}
38
+ - name: Install dependencies
39
+ run: bundle install
40
+ - name: Run tests
41
+ run: bundle exec rspec
data/.tool-versions CHANGED
@@ -1 +1 @@
1
- ruby 2.7.4
1
+ ruby 3.0.2
data/.travis.yml CHANGED
@@ -7,6 +7,8 @@ rvm:
7
7
  - 2.4.4
8
8
  - 2.5.5
9
9
  - 2.6.2
10
+ - 2.7.4
11
+ - 3.0.2
10
12
  - ruby-head
11
13
  matrix:
12
14
  allow_failures:
data/Gemfile.lock CHANGED
@@ -1,8 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sidekiq_alive (2.1.2)
4
+ sidekiq_alive (2.1.5)
5
5
  sidekiq
6
+ webrick
6
7
 
7
8
  GEM
8
9
  remote: https://rubygems.org/
@@ -43,6 +44,7 @@ GEM
43
44
  rack (>= 1.5.0)
44
45
  rack-protection (>= 1.5.0)
45
46
  redis (>= 3.3.5, < 5)
47
+ webrick (1.7.0)
46
48
 
47
49
  PLATFORMS
48
50
  ruby
@@ -10,7 +10,7 @@ module SidekiqAlive
10
10
 
11
11
  Signal.trap('TERM') { handler.shutdown }
12
12
 
13
- handler.run(self, Port: port, Host: '0.0.0.0', AccessLog: [])
13
+ handler.run(self, Port: port, Host: host, AccessLog: [], Logger: SidekiqAlive.logger)
14
14
  end
15
15
 
16
16
  def host
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SidekiqAlive
4
- VERSION = '2.1.2'
4
+ VERSION = '2.1.5'
5
5
  end
data/lib/sidekiq_alive.rb CHANGED
@@ -56,10 +56,12 @@ module SidekiqAlive
56
56
  end
57
57
 
58
58
  def self.deep_scan(keyword, keys = [], cursor = 0)
59
- next_cursor, found_keys = *redis { |r| r }.scan(cursor, match: keyword)
60
- keys += found_keys
61
- return keys if next_cursor == "0" || found_keys.blank?
62
- deep_scan(keyword, keys, next_cursor)
59
+ loop do
60
+ cursor, found_keys = SidekiqAlive.redis.scan(cursor, match: keyword, count: 1000)
61
+ keys += found_keys
62
+ break if cursor.to_i == 0
63
+ end
64
+ keys
63
65
  end
64
66
 
65
67
  def self.purge_pending_jobs
@@ -36,4 +36,5 @@ Gem::Specification.new do |spec|
36
36
  spec.add_development_dependency 'rspec', '~> 3.0'
37
37
  spec.add_development_dependency 'rspec-sidekiq', '~> 3.0'
38
38
  spec.add_dependency 'sidekiq'
39
+ spec.add_dependency 'webrick'
39
40
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq_alive
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artur Pañach
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-26 00:00:00.000000000 Z
11
+ date: 2022-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -108,6 +108,20 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: webrick
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
111
125
  description: |-
112
126
  SidekiqAlive offers a solution to add liveness probe of a Sidekiq instance.
113
127
 
@@ -126,6 +140,7 @@ extensions: []
126
140
  extra_rdoc_files: []
127
141
  files:
128
142
  - ".github/workflows/ruby.yml"
143
+ - ".github/workflows/test.yml"
129
144
  - ".gitignore"
130
145
  - ".rspec"
131
146
  - ".tool-versions"
@@ -149,7 +164,7 @@ homepage: https://github.com/arturictus/sidekiq_alive
149
164
  licenses:
150
165
  - MIT
151
166
  metadata: {}
152
- post_install_message:
167
+ post_install_message:
153
168
  rdoc_options: []
154
169
  require_paths:
155
170
  - lib
@@ -164,8 +179,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
179
  - !ruby/object:Gem::Version
165
180
  version: '0'
166
181
  requirements: []
167
- rubygems_version: 3.1.6
168
- signing_key:
182
+ rubygems_version: 3.2.22
183
+ signing_key:
169
184
  specification_version: 4
170
185
  summary: Liveness probe for sidekiq on Kubernetes deployments.
171
186
  test_files: []