sidekiq-queue-pause 0.0.4 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sidekiq-queue-pause.rb +13 -13
  3. metadata +147 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0964ee587695c5d418c8cc134b6b509cbf2ebbce082de1a75ea51947b9083c83'
4
- data.tar.gz: 695bbaef2afde1dc44fdf2c8de1def379a2e6e5653d4ed8cddbcc40ec67611ff
3
+ metadata.gz: 79435cc2b1a76d507fd8fd5ea7807b015ccd2ee18142b33f322f6e3cf76d4b1d
4
+ data.tar.gz: 74a7976309c82b977b9eb18de5b5d2fa64664d25afdd8bee83df0f3319e35119
5
5
  SHA512:
6
- metadata.gz: a92406b7ed12db47758d8ecf7e60d3a755e32d0ca6ca7d579c6e6a395ba251852f2aef16ab0efad0290e7789c7241ab028d750a23b62e3582768a1c8a00d44a7
7
- data.tar.gz: 1ef22ccbde09317be2699e21a4fad23382010f202dae8c2fc9f6add73269d12919749adc08e060f566c5908b3c7356e2100c85e8178b97d07ab4ef9eca80964b
6
+ metadata.gz: e6929c42a934c77829c97201a331604b09b2b0f9dd1847868616b7ffddb5e56b5bb1b4f419e174f85f8ea96157f6cd0688765f6cbdc281a4c3cfd6c3e12c4d44
7
+ data.tar.gz: 88c8ccc56a1bf660930747b011cdd69a8b0e3ca1b09b10125e6cb86ffea5b6b2cd4b2e643490ad77ab139f5429cf1ed3eb2f0907ac289190af6e715e17fc5fb5
@@ -1,21 +1,16 @@
1
- begin
2
- require 'celluloid'
3
- rescue LoadError
4
- # Sidekiq 4.2+
5
- end
6
- require 'sidekiq'
7
- require 'sidekiq/fetch'
1
+ require "sidekiq"
2
+ require "sidekiq/fetch"
8
3
 
9
4
  module Sidekiq
10
5
  module QueuePause
11
- PREFIX = 'queue_pause'
6
+ PREFIX = "queue_pause"
12
7
 
13
8
  class << self
14
9
  attr_accessor :retry_after
15
- attr_writer :process_key
10
+ attr_writer :process_key
16
11
 
17
12
  def process_key(&block)
18
- if block_given?
13
+ if block
19
14
  @process_key = block
20
15
  else
21
16
  @process_key.is_a?(Proc) ? @process_key.call : @process_key
@@ -31,7 +26,7 @@ module Sidekiq
31
26
  end
32
27
 
33
28
  def paused?(queue, pkey = nil)
34
- Sidekiq.redis { |it| it.exists rkey(queue, pkey) }
29
+ Sidekiq.redis { |it| it.exists? rkey(queue, pkey) }
35
30
  end
36
31
 
37
32
  def unpause_all
@@ -62,11 +57,16 @@ module Sidekiq
62
57
  UnitOfWork.new(*work) if work
63
58
  end
64
59
 
60
+ # Returns the list of unpause queue names.
61
+ #
62
+ # @return [Array<String>] The list of unpaused queue names.
65
63
  def unpaused_queues_cmd
66
64
  queues = queues_cmd
67
65
  queues.reject do |q|
68
- q != Sidekiq::BasicFetch::TIMEOUT &&
69
- Sidekiq::QueuePause.paused?(q.gsub('queue:', ''), Sidekiq::QueuePause.process_key)
66
+ next if q.is_a?(Integer)
67
+ next if q.is_a?(Hash)
68
+
69
+ Sidekiq::QueuePause.paused?(q.gsub("queue:", ""), Sidekiq::QueuePause.process_key)
70
70
  end
71
71
  end
72
72
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-queue-pause
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Projective Technology GmbH
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-15 00:00:00.000000000 Z
11
+ date: 2023-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq
@@ -16,20 +16,160 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '4.0'
19
+ version: '6.0'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '5.0'
22
+ version: '7.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '4.0'
29
+ version: '6.0'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '5.0'
32
+ version: '7.0'
33
+ - !ruby/object:Gem::Dependency
34
+ name: rspec
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '3'
40
+ type: :development
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '3'
47
+ - !ruby/object:Gem::Dependency
48
+ name: simplecov
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '0.21'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '0.21'
61
+ - !ruby/object:Gem::Dependency
62
+ name: solargraph
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '0.44'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '0.44'
75
+ - !ruby/object:Gem::Dependency
76
+ name: solargraph-standardrb
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: 0.0.4
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: 0.0.4
89
+ - !ruby/object:Gem::Dependency
90
+ name: standard
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '1.4'
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: '1.4'
103
+ - !ruby/object:Gem::Dependency
104
+ name: guard
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '2.18'
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - "~>"
115
+ - !ruby/object:Gem::Version
116
+ version: '2.18'
117
+ - !ruby/object:Gem::Dependency
118
+ name: guard-rspec
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - "~>"
122
+ - !ruby/object:Gem::Version
123
+ version: '4.7'
124
+ type: :development
125
+ prerelease: false
126
+ version_requirements: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - "~>"
129
+ - !ruby/object:Gem::Version
130
+ version: '4.7'
131
+ - !ruby/object:Gem::Dependency
132
+ name: pronto
133
+ requirement: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - "~>"
136
+ - !ruby/object:Gem::Version
137
+ version: '0.11'
138
+ type: :development
139
+ prerelease: false
140
+ version_requirements: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - "~>"
143
+ - !ruby/object:Gem::Version
144
+ version: '0.11'
145
+ - !ruby/object:Gem::Dependency
146
+ name: pronto-standardrb
147
+ requirement: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - "~>"
150
+ - !ruby/object:Gem::Version
151
+ version: '0.1'
152
+ type: :development
153
+ prerelease: false
154
+ version_requirements: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - "~>"
157
+ - !ruby/object:Gem::Version
158
+ version: '0.1'
159
+ - !ruby/object:Gem::Dependency
160
+ name: pronto-simplecov
161
+ requirement: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - "~>"
164
+ - !ruby/object:Gem::Version
165
+ version: '0.11'
166
+ type: :development
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - "~>"
171
+ - !ruby/object:Gem::Version
172
+ version: '0.11'
33
173
  description: Let's you pause/unpause individual sidekiq queues.
34
174
  email: technology@projective.io
35
175
  executables: []
@@ -56,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
56
196
  - !ruby/object:Gem::Version
57
197
  version: '0'
58
198
  requirements: []
59
- rubygems_version: 3.2.5
199
+ rubygems_version: 3.3.23
60
200
  signing_key:
61
201
  specification_version: 4
62
202
  summary: Pause a Sidekiq queue