sidekiq_alive 2.1.4 → 2.1.5

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: 2f200ab5c4b5282e98520a57e341fdc98d73d971abca9931c96135dd07b505d0
4
+ data.tar.gz: 7eca663e0264246ff8a285a166233054ea01b446b526fccd9dc1382c1acbf493
5
5
  SHA512:
6
- metadata.gz: 2c0074d76de89030184eac7463a7227aeacb767c54d89a34e1cbb80253342a3378fcfec07cf91f04bba5a91cf4aec4b8608b992c4c83d3379fdb78bee45312be
7
- data.tar.gz: 68a46cb3ed64998666966b8d45ae0d424946899877ae25367ec855d0e150b2b5a91e153af79cfa0d6fd78a92a25fcdd666674e8fa53138c81306a4547766cd51
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
@@ -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/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.5)
5
5
  sidekiq
6
6
  webrick
7
7
 
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.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
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.5
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-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler