sidekiq 7.0.6 → 7.0.8
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 +17 -1
- data/lib/sidekiq/fetch.rb +1 -1
- data/lib/sidekiq/job_retry.rb +4 -3
- data/lib/sidekiq/launcher.rb +1 -0
- data/lib/sidekiq/version.rb +1 -1
- data/lib/sidekiq/web/application.rb +2 -2
- data/sidekiq.gemspec +2 -1
- data/web/locales/ja.yml +3 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69b692f7976998a1655a5c6f108c0a1f686fdcdcde164f6cde071f9ea3f89ced
|
4
|
+
data.tar.gz: d78d581fa48b744789b3af117a55d71bab1037b592f58ee9c74cf2c132716e0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42d16710f20a67a94df6498cf1fb5097a8795a5611f058e58d60e43e82503d26871c6d3061b3404590a0e0eba319997cb7e1daec3a88b66c2356e9cc0164a781
|
7
|
+
data.tar.gz: 5b6d9aa7512a67cb552c3a1bed37aa111a877927e7690f53efd3e85aa1ea7049fb75eb05b31232810c8a805f95cb0959a54cc80bafb5c80f9aae0c0701d158b7
|
data/Changes.md
CHANGED
@@ -2,7 +2,23 @@
|
|
2
2
|
|
3
3
|
[Sidekiq Changes](https://github.com/sidekiq/sidekiq/blob/main/Changes.md) | [Sidekiq Pro Changes](https://github.com/sidekiq/sidekiq/blob/main/Pro-Changes.md) | [Sidekiq Enterprise Changes](https://github.com/sidekiq/sidekiq/blob/main/Ent-Changes.md)
|
4
4
|
|
5
|
-
7.0.
|
5
|
+
7.0.8
|
6
|
+
----------
|
7
|
+
|
8
|
+
- **SECURITY** Sanitize `period` input parameter on Metrics pages.
|
9
|
+
Specially crafted values can lead to XSS. This functionality
|
10
|
+
was introduced in 7.0.4. Thank you to spercex @ huntr.dev [#5694]
|
11
|
+
- Add job hash as 3rd parameter to the `sidekiq_retry_in` block.
|
12
|
+
|
13
|
+
7.0.7
|
14
|
+
----------
|
15
|
+
|
16
|
+
- Fix redis-client API usage which could result in stuck Redis
|
17
|
+
connections [#5823]
|
18
|
+
- Fix AS::Duration with `sidekiq_retry_in` [#5806]
|
19
|
+
- Restore dumping config options on startup with `-v` [#5822]
|
20
|
+
|
21
|
+
7.0.5,7.0.6
|
6
22
|
----------
|
7
23
|
|
8
24
|
- More context for debugging json unsafe errors [#5787]
|
data/lib/sidekiq/fetch.rb
CHANGED
@@ -44,7 +44,7 @@ module Sidekiq # :nodoc:
|
|
44
44
|
return nil
|
45
45
|
end
|
46
46
|
|
47
|
-
queue, job = redis { |conn| conn.blocking_call(
|
47
|
+
queue, job = redis { |conn| conn.blocking_call(TIMEOUT + 1, "brpop", *qs, TIMEOUT) }
|
48
48
|
UnitOfWork.new(queue, job, config) if queue
|
49
49
|
end
|
50
50
|
|
data/lib/sidekiq/job_retry.rb
CHANGED
@@ -171,7 +171,7 @@ module Sidekiq
|
|
171
171
|
# Goodbye dear message, you (re)tried your best I'm sure.
|
172
172
|
return retries_exhausted(jobinst, msg, exception) if count >= max_retry_attempts
|
173
173
|
|
174
|
-
strategy, delay = delay_for(jobinst, count, exception)
|
174
|
+
strategy, delay = delay_for(jobinst, count, exception, msg)
|
175
175
|
case strategy
|
176
176
|
when :discard
|
177
177
|
return # poof!
|
@@ -190,17 +190,18 @@ module Sidekiq
|
|
190
190
|
end
|
191
191
|
|
192
192
|
# returns (strategy, seconds)
|
193
|
-
def delay_for(jobinst, count, exception)
|
193
|
+
def delay_for(jobinst, count, exception, msg)
|
194
194
|
rv = begin
|
195
195
|
# sidekiq_retry_in can return two different things:
|
196
196
|
# 1. When to retry next, as an integer of seconds
|
197
197
|
# 2. A symbol which re-routes the job elsewhere, e.g. :discard, :kill, :default
|
198
|
-
jobinst&.sidekiq_retry_in_block&.call(count, exception)
|
198
|
+
jobinst&.sidekiq_retry_in_block&.call(count, exception, msg)
|
199
199
|
rescue Exception => e
|
200
200
|
handle_exception(e, {context: "Failure scheduling retry using the defined `sidekiq_retry_in` in #{jobinst.class.name}, falling back to default"})
|
201
201
|
nil
|
202
202
|
end
|
203
203
|
|
204
|
+
rv = rv.to_i if rv.respond_to?(:to_i)
|
204
205
|
delay = (count**4) + 15
|
205
206
|
if Integer === rv && rv > 0
|
206
207
|
delay = rv
|
data/lib/sidekiq/launcher.rb
CHANGED
@@ -37,6 +37,7 @@ module Sidekiq
|
|
37
37
|
# and instead have thread call Launcher#heartbeat every N seconds.
|
38
38
|
def run(async_beat: true)
|
39
39
|
Sidekiq.freeze!
|
40
|
+
logger.debug { @config.merge!({}) }
|
40
41
|
@thread = safe_thread("heartbeat", &method(:start_heartbeat)) if async_beat
|
41
42
|
@poller.start
|
42
43
|
@managers.each(&:start)
|
data/lib/sidekiq/version.rb
CHANGED
@@ -68,7 +68,7 @@ module Sidekiq
|
|
68
68
|
|
69
69
|
get "/metrics" do
|
70
70
|
q = Sidekiq::Metrics::Query.new
|
71
|
-
@period = params[:period]
|
71
|
+
@period = h((params[:period] || "")[0..1])
|
72
72
|
@periods = METRICS_PERIODS
|
73
73
|
minutes = @periods.fetch(@period, @periods.values.first)
|
74
74
|
@query_result = q.top_jobs(minutes: minutes)
|
@@ -77,7 +77,7 @@ module Sidekiq
|
|
77
77
|
|
78
78
|
get "/metrics/:name" do
|
79
79
|
@name = route_params[:name]
|
80
|
-
@period = params[:period]
|
80
|
+
@period = h((params[:period] || "")[0..1])
|
81
81
|
q = Sidekiq::Metrics::Query.new
|
82
82
|
@periods = METRICS_PERIODS
|
83
83
|
minutes = @periods.fetch(@period, @periods.values.first)
|
data/sidekiq.gemspec
CHANGED
@@ -19,7 +19,8 @@ Gem::Specification.new do |gem|
|
|
19
19
|
"bug_tracker_uri" => "https://github.com/sidekiq/sidekiq/issues",
|
20
20
|
"documentation_uri" => "https://github.com/sidekiq/sidekiq/wiki",
|
21
21
|
"changelog_uri" => "https://github.com/sidekiq/sidekiq/blob/main/Changes.md",
|
22
|
-
"source_code_uri" => "https://github.com/sidekiq/sidekiq"
|
22
|
+
"source_code_uri" => "https://github.com/sidekiq/sidekiq",
|
23
|
+
"rubygems_mfa_required" => "true"
|
23
24
|
}
|
24
25
|
|
25
26
|
gem.add_dependency "redis-client", ">= 0.11.0"
|
data/web/locales/ja.yml
CHANGED
@@ -27,6 +27,7 @@ ja:
|
|
27
27
|
Extras: エクストラ
|
28
28
|
Failed: 失敗
|
29
29
|
Failures: 失敗
|
30
|
+
Failure: 失敗
|
30
31
|
GoBack: ← 戻る
|
31
32
|
History: 履歴
|
32
33
|
Job: ジョブ
|
@@ -75,6 +76,7 @@ ja:
|
|
75
76
|
Stop: 停止
|
76
77
|
StopAll: すべて停止
|
77
78
|
StopPolling: ポーリング停止
|
79
|
+
Success: 成功
|
78
80
|
Thread: スレッド
|
79
81
|
Threads: スレッド
|
80
82
|
ThreeMonths: 3 ヶ月
|
@@ -82,7 +84,7 @@ ja:
|
|
82
84
|
Unpause: 一時停止を解除
|
83
85
|
Metrics: メトリクス
|
84
86
|
NoDataFound: データが見つかりませんでした
|
85
|
-
|
87
|
+
TotalExecutionTime: 合計実行時間
|
86
88
|
AvgExecutionTime: 平均実行時間
|
87
89
|
Context: コンテキスト
|
88
90
|
Bucket: バケット
|
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: 7.0.
|
4
|
+
version: 7.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Perham
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis-client
|
@@ -205,6 +205,7 @@ metadata:
|
|
205
205
|
documentation_uri: https://github.com/sidekiq/sidekiq/wiki
|
206
206
|
changelog_uri: https://github.com/sidekiq/sidekiq/blob/main/Changes.md
|
207
207
|
source_code_uri: https://github.com/sidekiq/sidekiq
|
208
|
+
rubygems_mfa_required: 'true'
|
208
209
|
post_install_message: |2+
|
209
210
|
|
210
211
|
Welcome to Sidekiq 7.0!
|