sidekiq-queue-pause 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sidekiq-queue-pause.rb +12 -12
- metadata +143 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79435cc2b1a76d507fd8fd5ea7807b015ccd2ee18142b33f322f6e3cf76d4b1d
|
4
|
+
data.tar.gz: 74a7976309c82b977b9eb18de5b5d2fa64664d25afdd8bee83df0f3319e35119
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6929c42a934c77829c97201a331604b09b2b0f9dd1847868616b7ffddb5e56b5bb1b4f419e174f85f8ea96157f6cd0688765f6cbdc281a4c3cfd6c3e12c4d44
|
7
|
+
data.tar.gz: 88c8ccc56a1bf660930747b011cdd69a8b0e3ca1b09b10125e6cb86ffea5b6b2cd4b2e643490ad77ab139f5429cf1ed3eb2f0907ac289190af6e715e17fc5fb5
|
data/lib/sidekiq-queue-pause.rb
CHANGED
@@ -1,21 +1,16 @@
|
|
1
|
-
|
2
|
-
|
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 =
|
6
|
+
PREFIX = "queue_pause"
|
12
7
|
|
13
8
|
class << self
|
14
9
|
attr_accessor :retry_after
|
15
|
-
attr_writer
|
10
|
+
attr_writer :process_key
|
16
11
|
|
17
12
|
def process_key(&block)
|
18
|
-
if
|
13
|
+
if block
|
19
14
|
@process_key = block
|
20
15
|
else
|
21
16
|
@process_key.is_a?(Proc) ? @process_key.call : @process_key
|
@@ -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
|
-
|
69
|
-
|
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.1.
|
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:
|
11
|
+
date: 2023-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sidekiq
|
@@ -30,6 +30,146 @@ dependencies:
|
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
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.
|
199
|
+
rubygems_version: 3.3.23
|
60
200
|
signing_key:
|
61
201
|
specification_version: 4
|
62
202
|
summary: Pause a Sidekiq queue
|