sidekiq_alive 2.1.4 → 2.1.6

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: 45d77df41c90efdbcb9ef9c1faa749cfeca83725eddf9d91714ff537faaa7348
4
- data.tar.gz: f74f776df3b92e098b8b6178e3a114056d9d09fe975d42062ed8dd91d17ec4db
3
+ metadata.gz: 76f6e9a464393aa3302fbac6d7baf2e58338fe8326101d644a6a3d963dd38305
4
+ data.tar.gz: 781f50dd5cf55b17421b287ce56c193baf33a99cb504290592643bdf79a0078b
5
5
  SHA512:
6
- metadata.gz: 2c0074d76de89030184eac7463a7227aeacb767c54d89a34e1cbb80253342a3378fcfec07cf91f04bba5a91cf4aec4b8608b992c4c83d3379fdb78bee45312be
7
- data.tar.gz: 68a46cb3ed64998666966b8d45ae0d424946899877ae25367ec855d0e150b2b5a91e153af79cfa0d6fd78a92a25fcdd666674e8fa53138c81306a4547766cd51
6
+ metadata.gz: 62ca85ef26fa1b6991a06ec7095a38280bd6165111b0897e9fa52e83e09a806c6bd125de6233084b559f216c831d8cc4735fb4f84b720cc1f46916b63eeb52ef
7
+ data.tar.gz: 5579938e0bbf3a79d727d651fab8167d06e83d480bd145efcf1f2d6fb3b896e07cf3555be77ae5376f9af5bc2164fbce6acf8dcffb84e156d9d118e9dccf3c2c
@@ -2,9 +2,9 @@ name: Ruby CI
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [main]
5
+ branches: [main, master]
6
6
  pull_request:
7
- branches: [main]
7
+ branches: [main, master]
8
8
 
9
9
  jobs:
10
10
  test:
@@ -12,7 +12,7 @@ jobs:
12
12
 
13
13
  strategy:
14
14
  matrix:
15
- ruby-version: [3.0.x, 2.7.x, 2.6.x, 2.5.x]
15
+ ruby-version: ["3.1", "3.0", "2.7", "2.6", "2.5"]
16
16
  # Service containers to run with `runner-job`
17
17
  services:
18
18
  # Label used to access the service container
@@ -32,7 +32,7 @@ jobs:
32
32
  steps:
33
33
  - uses: actions/checkout@v2
34
34
  - name: Set up Ruby ${{ matrix.ruby-version }}
35
- uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
35
+ uses: ruby/setup-ruby@v1
36
36
  with:
37
37
  ruby-version: ${{ matrix.ruby-version }}
38
38
  - name: Install dependencies
data/.tool-versions CHANGED
@@ -1 +1 @@
1
- ruby 3.0.2
1
+ ruby 3.1.3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sidekiq_alive (2.1.4)
4
+ sidekiq_alive (2.1.6)
5
5
  sidekiq
6
6
  webrick
7
7
 
@@ -9,7 +9,7 @@ GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
11
  coderay (1.1.2)
12
- connection_pool (2.2.2)
12
+ connection_pool (2.2.5)
13
13
  diff-lcs (1.3)
14
14
  method_source (0.9.2)
15
15
  mock_redis (0.19.0)
@@ -17,12 +17,10 @@ GEM
17
17
  coderay (~> 1.1.0)
18
18
  method_source (~> 0.9.0)
19
19
  rack (2.2.3)
20
- rack-protection (2.0.5)
21
- rack
22
20
  rack-test (1.1.0)
23
21
  rack (>= 1.0, < 3)
24
22
  rake (13.0.3)
25
- redis (4.1.0)
23
+ redis (4.6.0)
26
24
  rspec (3.8.0)
27
25
  rspec-core (~> 3.8.0)
28
26
  rspec-expectations (~> 3.8.0)
@@ -39,11 +37,10 @@ GEM
39
37
  rspec-core (~> 3.0, >= 3.0.0)
40
38
  sidekiq (>= 2.4.0)
41
39
  rspec-support (3.8.0)
42
- sidekiq (5.2.5)
43
- connection_pool (~> 2.2, >= 2.2.2)
44
- rack (>= 1.5.0)
45
- rack-protection (>= 1.5.0)
46
- redis (>= 3.3.5, < 5)
40
+ sidekiq (6.4.1)
41
+ connection_pool (>= 2.2.2)
42
+ rack (~> 2.0)
43
+ redis (>= 4.2.0)
47
44
  webrick (1.7.0)
48
45
 
49
46
  PLATFORMS
data/docker-compose.yml CHANGED
@@ -4,4 +4,3 @@ services:
4
4
  image: redis
5
5
  ports:
6
6
  - 6379:6379
7
- network_mode: host
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SidekiqAlive
4
- VERSION = '2.1.4'
4
+ VERSION = '2.1.6'
5
5
  end
data/lib/sidekiq_alive.rb CHANGED
@@ -9,7 +9,7 @@ module SidekiqAlive
9
9
  SidekiqAlive::Worker.sidekiq_options queue: current_queue
10
10
  Sidekiq.configure_server do |sq_config|
11
11
 
12
- sq_config.options[:queues].unshift(current_queue)
12
+ (sq_config.respond_to?(:[]) ? sq_config[:queues] : sq_config.options[:queues]).unshift(current_queue)
13
13
 
14
14
  sq_config.on(:startup) do
15
15
  SidekiqAlive.tap do |sa|
@@ -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
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.4
4
+ version: 2.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artur Pañach
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-27 00:00:00.000000000 Z
11
+ date: 2022-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -139,12 +139,10 @@ executables: []
139
139
  extensions: []
140
140
  extra_rdoc_files: []
141
141
  files:
142
- - ".github/workflows/ruby.yml"
143
142
  - ".github/workflows/test.yml"
144
143
  - ".gitignore"
145
144
  - ".rspec"
146
145
  - ".tool-versions"
147
- - ".travis.yml"
148
146
  - CODE_OF_CONDUCT.md
149
147
  - Gemfile
150
148
  - Gemfile.lock
@@ -179,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
179
177
  - !ruby/object:Gem::Version
180
178
  version: '0'
181
179
  requirements: []
182
- rubygems_version: 3.2.22
180
+ rubygems_version: 3.3.26
183
181
  signing_key:
184
182
  specification_version: 4
185
183
  summary: Liveness probe for sidekiq on Kubernetes deployments.
@@ -1,48 +0,0 @@
1
- # This workflow uses actions that are not certified by GitHub.
2
- # They are provided by a third-party and are governed by
3
- # separate terms of service, privacy policy, and support
4
- # documentation.
5
- # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
- # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
-
8
- name: Ruby
9
-
10
- on:
11
- push:
12
- branches: [master]
13
- pull_request:
14
- branches: [master]
15
-
16
- jobs:
17
- test:
18
- runs-on: ubuntu-latest
19
- strategy:
20
- matrix:
21
- ruby-version: ["2.6", "2.7", "3.0"]
22
- services:
23
- # Label used to access the service container
24
- redis:
25
- # Docker Hub image
26
- image: redis
27
- # Set health checks to wait until redis has started
28
- options: >-
29
- --health-cmd "redis-cli ping"
30
- --health-interval 10s
31
- --health-timeout 5s
32
- --health-retries 5
33
- ports:
34
- # Maps port 6379 on service container to the host
35
- - 6379:6379
36
-
37
- steps:
38
- - uses: actions/checkout@v2
39
- - name: Set up Ruby
40
- # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
41
- # change this to (see https://github.com/ruby/setup-ruby#versioning):
42
- # uses: ruby/setup-ruby@v1
43
- uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
44
- with:
45
- ruby-version: ${{ matrix.ruby-version }}
46
- bundler-cache: true # runs 'bundle install' and caches installed gems automatically
47
- - name: Run tests
48
- run: bundle exec rake
data/.travis.yml DELETED
@@ -1,27 +0,0 @@
1
- language: ruby
2
- sudo: required
3
- services: redis
4
- cache: bundler
5
- rvm:
6
- - 2.3.7
7
- - 2.4.4
8
- - 2.5.5
9
- - 2.6.2
10
- - 2.7.4
11
- - 3.0.2
12
- - ruby-head
13
- matrix:
14
- allow_failures:
15
- - rvm: ruby-head
16
- before_install: gem install bundler -v 1.17.3
17
- env:
18
- global:
19
- - CC_TEST_REPORTER_ID=571b470a2b61f8a58b2a0ebbcf297805efa07c548e45bac9d1c9ce0c5edcfc20
20
- before_script:
21
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
22
- - chmod +x ./cc-test-reporter
23
- - ./cc-test-reporter before-build
24
- script:
25
- - bundle exec rspec
26
- after_script:
27
- - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT