sidekiq-pauzer 2.1.0 → 2.2.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: 7bfbbdbcf00da656eb48a8dccb0807b68e8554f6a02c6ed54e954f19d0ddd46b
4
- data.tar.gz: 4887f3d8e032f2a48327e4e40ded771cf8552620f82e6b2744ce0625b0d89369
3
+ metadata.gz: b7181876b443f54e7ce377358fc1dc9920bf6aff98973aa5d1499e1b2a56401a
4
+ data.tar.gz: ee6a16525e36c8c4ba468817be43298cfd5905760e5fb737e6a743ec1577b0fc
5
5
  SHA512:
6
- metadata.gz: 73d2a4ae6200e308e83052947614759ea3db81bf22d481d67ae2d4c83d6531aa1c267f0662e8e231c0bad4e5091d6e99e568ae16e8919af016b55f742d4f243e
7
- data.tar.gz: ca0824fa84c56ef904cac670fe5ed43d1f90701c6983ca0710cfa5d71cb01dd9a05ceeed45c8d98c9c32eb4a03192eae19120bf1fd7c7ac8e86f09baaa33bb99
6
+ metadata.gz: 27c52a1aa9e02ad2dbb48ea2be6af3458e11798974d963e03a0f7edb729d8fc6dd09ab56f259be8006da5bc9a1cf51e9e87cb8e7b35c6f2f9174d381d76d4d29
7
+ data.tar.gz: fb4f9043119f8c26b1be9aa5d6aed8cdd14640a7a6b630607bb3694ec0e0f1ccad8e8e3a802a57949c70cafd45e0375bfed99138badd303daa217d1bdc4da97c
@@ -14,8 +14,7 @@ module Sidekiq
14
14
 
15
15
  # @param config [Config]
16
16
  def initialize(config)
17
- @mutex = Mutex.new
18
- @names = []
17
+ @names = Concurrent::Array.new
19
18
  @redis_key = config.redis_key
20
19
  @refresher = initialize_refresher(config.refresh_rate)
21
20
  end
@@ -23,7 +22,7 @@ module Sidekiq
23
22
  def each(&block)
24
23
  return to_enum __method__ unless block
25
24
 
26
- @mutex.synchronize { @names.dup }.each(&block)
25
+ @names.dup.each(&block)
27
26
 
28
27
  self
29
28
  end
@@ -73,11 +72,7 @@ module Sidekiq
73
72
  end
74
73
 
75
74
  def refresh
76
- @mutex.synchronize do
77
- names = Sidekiq.redis { |conn| Adapters[conn].list(conn, @redis_key) }
78
-
79
- @names.replace(names)
80
- end
75
+ @names.replace(Sidekiq.redis { |conn| Adapters[conn].list(conn, @redis_key) })
81
76
 
82
77
  self
83
78
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sidekiq
4
4
  module Pauzer
5
- VERSION = "2.1.0"
5
+ VERSION = "2.2.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-pauzer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexey Zapparov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-12 00:00:00.000000000 Z
11
+ date: 2023-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -66,9 +66,9 @@ licenses:
66
66
  - MIT
67
67
  metadata:
68
68
  homepage_uri: https://gitlab.com/ixti/sidekiq-pauzer
69
- source_code_uri: https://gitlab.com/ixti/sidekiq-pauzer/tree/v2.1.0
69
+ source_code_uri: https://gitlab.com/ixti/sidekiq-pauzer/tree/v2.2.0
70
70
  bug_tracker_uri: https://gitlab.com/ixti/sidekiq-pauzer/issues
71
- changelog_uri: https://gitlab.com/ixti/sidekiq-pauzer/blob/v2.1.0/CHANGES.md
71
+ changelog_uri: https://gitlab.com/ixti/sidekiq-pauzer/blob/v2.2.0/CHANGES.md
72
72
  rubygems_mfa_required: 'true'
73
73
  post_install_message:
74
74
  rdoc_options: []