sidekiq 5.2.1 → 5.2.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sidekiq might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Changes.md +7 -0
- data/Pro-Changes.md +7 -0
- data/lib/sidekiq/api.rb +6 -0
- data/lib/sidekiq/cli.rb +3 -3
- data/lib/sidekiq/processor.rb +30 -4
- data/lib/sidekiq/redis_connection.rb +1 -1
- data/lib/sidekiq/version.rb +1 -1
- data/lib/sidekiq/web/application.rb +6 -0
- data/lib/sidekiq/web/helpers.rb +1 -1
- data/web/locales/ar.yml +1 -0
- data/web/locales/en.yml +1 -0
- data/web/views/queue.erb +1 -0
- data/web/views/retries.erb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 985b2f1c0778b1e4d2587eb2f182fc58723277c7
|
4
|
+
data.tar.gz: 2d20a6e15e248bea802b1ca9438c9507a1f94ab4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e4be1e23c16eb53d43424a0a07e6b69ab2001ffbbaf28c7c09db1dac89d9f1e9ac3513c70ac5abd398efb12c8a712da20f563df5fd055c6855eb5d2d7abea05
|
7
|
+
data.tar.gz: 8947fc9287e9a1336ba57b6ef380e5f76d7ea7382fff3930acd914c6c08fed9c08940780c1537bbedf349ed29257b9c249f8356eed095d8537a4195e7426b676
|
data/Changes.md
CHANGED
@@ -2,6 +2,13 @@
|
|
2
2
|
|
3
3
|
[Sidekiq Changes](https://github.com/mperham/sidekiq/blob/master/Changes.md) | [Sidekiq Pro Changes](https://github.com/mperham/sidekiq/blob/master/Pro-Changes.md) | [Sidekiq Enterprise Changes](https://github.com/mperham/sidekiq/blob/master/Ent-Changes.md)
|
4
4
|
|
5
|
+
5.2.2
|
6
|
+
---------
|
7
|
+
|
8
|
+
- Raise error for duplicate queue names in config to avoid unexpected fetch algorithm change [#3911]
|
9
|
+
- Fix concurrency bug on JRuby [#3958, mattbooks]
|
10
|
+
- Add "Kill All" button to the retries page [#3938]
|
11
|
+
|
5
12
|
5.2.1
|
6
13
|
-----------
|
7
14
|
|
data/Pro-Changes.md
CHANGED
@@ -4,6 +4,12 @@
|
|
4
4
|
|
5
5
|
Please see [http://sidekiq.org/](http://sidekiq.org/) for more details and how to buy.
|
6
6
|
|
7
|
+
4.0.4
|
8
|
+
---------
|
9
|
+
|
10
|
+
- Update Sidekiq::Client patches to work with new Module#prepend
|
11
|
+
mechanism in Sidekiq 5.2.0. [#3930]
|
12
|
+
|
7
13
|
4.0.3
|
8
14
|
---------
|
9
15
|
|
@@ -26,6 +32,7 @@ batch.on(:death, ...)
|
|
26
32
|
---------
|
27
33
|
|
28
34
|
- Fix incompatibility with the statsd-ruby gem [#3740]
|
35
|
+
- Add tags to Statsd metrics when using Datadog [#3744]
|
29
36
|
|
30
37
|
4.0.0
|
31
38
|
---------
|
data/lib/sidekiq/api.rb
CHANGED
data/lib/sidekiq/cli.rb
CHANGED
@@ -436,9 +436,9 @@ module Sidekiq
|
|
436
436
|
end
|
437
437
|
|
438
438
|
def parse_queue(opts, q, weight=nil)
|
439
|
-
[
|
440
|
-
|
441
|
-
|
439
|
+
opts[:queues] ||= []
|
440
|
+
raise ArgumentError, "queues: #{q} cannot be defined twice" if opts[:queues].include?(q)
|
441
|
+
[weight.to_i, 1].max.times { opts[:queues] << q }
|
442
442
|
opts[:strict] = false if weight.to_i > 0
|
443
443
|
end
|
444
444
|
end
|
data/lib/sidekiq/processor.rb
CHANGED
@@ -203,15 +203,41 @@ module Sidekiq
|
|
203
203
|
end
|
204
204
|
end
|
205
205
|
|
206
|
+
# jruby's Hash implementation is not threadsafe, so we wrap it in a mutex here
|
207
|
+
class SharedWorkerState
|
208
|
+
def initialize
|
209
|
+
@worker_state = {}
|
210
|
+
@lock = Mutex.new
|
211
|
+
end
|
212
|
+
|
213
|
+
def set(tid, hash)
|
214
|
+
@lock.synchronize { @worker_state[tid] = hash }
|
215
|
+
end
|
216
|
+
|
217
|
+
def delete(tid)
|
218
|
+
@lock.synchronize { @worker_state.delete(tid) }
|
219
|
+
end
|
220
|
+
|
221
|
+
def dup
|
222
|
+
@lock.synchronize { @worker_state.dup }
|
223
|
+
end
|
224
|
+
|
225
|
+
def size
|
226
|
+
@lock.synchronize { @worker_state.size }
|
227
|
+
end
|
228
|
+
|
229
|
+
def clear
|
230
|
+
@lock.synchronize { @worker_state.clear }
|
231
|
+
end
|
232
|
+
end
|
233
|
+
|
206
234
|
PROCESSED = Counter.new
|
207
235
|
FAILURE = Counter.new
|
208
|
-
|
209
|
-
# its own unique key/value, there's no thread-safety issue AFAIK.
|
210
|
-
WORKER_STATE = {}
|
236
|
+
WORKER_STATE = SharedWorkerState.new
|
211
237
|
|
212
238
|
def stats(job_hash, queue)
|
213
239
|
tid = Sidekiq::Logging.tid
|
214
|
-
WORKER_STATE
|
240
|
+
WORKER_STATE.set(tid, {:queue => queue, :payload => job_hash, :run_at => Time.now.to_i })
|
215
241
|
|
216
242
|
begin
|
217
243
|
yield
|
@@ -78,7 +78,7 @@ module Sidekiq
|
|
78
78
|
opts.delete(:network_timeout)
|
79
79
|
end
|
80
80
|
|
81
|
-
opts[:driver] ||= 'ruby'
|
81
|
+
opts[:driver] ||= Redis::Connection.drivers.last || 'ruby'
|
82
82
|
|
83
83
|
# Issue #3303, redis-rb will silently retry an operation.
|
84
84
|
# This can lead to duplicate jobs if Sidekiq::Client's LPUSH
|
data/lib/sidekiq/version.rb
CHANGED
@@ -196,6 +196,12 @@ module Sidekiq
|
|
196
196
|
redirect "#{root_path}retries"
|
197
197
|
end
|
198
198
|
|
199
|
+
post "/retries/all/kill" do
|
200
|
+
Sidekiq::RetrySet.new.kill_all
|
201
|
+
|
202
|
+
redirect "#{root_path}retries"
|
203
|
+
end
|
204
|
+
|
199
205
|
post "/retries/:key" do
|
200
206
|
job = Sidekiq::RetrySet.new.fetch(*parse_params(route_params[:key])).first
|
201
207
|
|
data/lib/sidekiq/web/helpers.rb
CHANGED
data/web/locales/ar.yml
CHANGED
data/web/locales/en.yml
CHANGED
data/web/views/queue.erb
CHANGED
data/web/views/retries.erb
CHANGED
@@ -69,6 +69,10 @@
|
|
69
69
|
<%= csrf_tag %>
|
70
70
|
<input class="btn btn-danger btn-xs pull-right flip" type="submit" name="retry" value="<%= t('RetryAll') %>" data-confirm="<%= t('AreYouSure') %>" />
|
71
71
|
</form>
|
72
|
+
<form action="<%= root_path %>retries/all/kill" method="post">
|
73
|
+
<%= csrf_tag %>
|
74
|
+
<input class="btn btn-danger btn-xs pull-right flip" type="submit" name="kill" value="<%= t('KillAll') %>" data-confirm="<%= t('AreYouSure') %>" />
|
75
|
+
</form>
|
72
76
|
<% end %>
|
73
77
|
|
74
78
|
<% else %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.2.
|
4
|
+
version: 5.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Perham
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|