sidekiq 7.3.6 → 7.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Changes.md +8 -0
- data/lib/sidekiq/component.rb +22 -0
- data/lib/sidekiq/config.rb +6 -0
- data/lib/sidekiq/version.rb +1 -1
- data/lib/sidekiq/web/action.rb +14 -2
- data/lib/sidekiq/web/application.rb +3 -3
- data/lib/sidekiq/web/helpers.rb +3 -2
- data/lib/sidekiq/web.rb +5 -0
- data/web/views/morgue.erb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ea55d72538bcb50922f70f95398326d17853da6a3c2948c9e2812284e8aba22
|
4
|
+
data.tar.gz: d18ff9909dded3154993fde2413f33630990cdfa42134fd640f7f714f0fd03ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40d7243cfbce6285d5560c81c55fcae66eacf1251e130bc2b8f8bbf58feadbb1538935760f8dbd07279f9076a92c7f1b276e28daf1fa3593f984fcbc6b8622eb
|
7
|
+
data.tar.gz: cbc6c05c11fb9ac4be45da59400e1bc31da98c14a8054318680c2498c34797199d32719eb1985a3061d61c54ce244bde5eaa3e9284b9484772766d2eb4b50cd0
|
data/Changes.md
CHANGED
@@ -2,6 +2,14 @@
|
|
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.3.7
|
6
|
+
----------
|
7
|
+
|
8
|
+
- Backport `Sidekiq::Web.configure` for compatibility with 8.0 [#6532]
|
9
|
+
- Backport `url_params(key)` and `route_params(key)` for compatibility with 8.0 [#6532]
|
10
|
+
- Various fixes for UI filtering [#6508]
|
11
|
+
- Tune `inspect` for internal S::Components to keep size managable [#6553]
|
12
|
+
|
5
13
|
7.3.6
|
6
14
|
----------
|
7
15
|
|
data/lib/sidekiq/component.rb
CHANGED
@@ -64,5 +64,27 @@ module Sidekiq
|
|
64
64
|
end
|
65
65
|
arr.clear if oneshot # once we've fired an event, we never fire it again
|
66
66
|
end
|
67
|
+
|
68
|
+
# When you have a large tree of components, the `inspect` output
|
69
|
+
# can get out of hand, especially with lots of Sidekiq::Config
|
70
|
+
# references everywhere. We avoid calling `inspect` on more complex
|
71
|
+
# state and use `to_s` instead to keep output manageable, #6553
|
72
|
+
def inspect
|
73
|
+
"#<#{self.class.name} #{
|
74
|
+
instance_variables.map do |name|
|
75
|
+
value = instance_variable_get(name)
|
76
|
+
case value
|
77
|
+
when Proc
|
78
|
+
"#{name}=#{value}"
|
79
|
+
when Sidekiq::Config
|
80
|
+
"#{name}=#{value}"
|
81
|
+
when Sidekiq::Component
|
82
|
+
"#{name}=#{value}"
|
83
|
+
else
|
84
|
+
"#{name}=#{value.inspect}"
|
85
|
+
end
|
86
|
+
end.join(", ")
|
87
|
+
}>"
|
88
|
+
end
|
67
89
|
end
|
68
90
|
end
|
data/lib/sidekiq/config.rb
CHANGED
@@ -61,6 +61,12 @@ module Sidekiq
|
|
61
61
|
def_delegators :@options, :[], :[]=, :fetch, :key?, :has_key?, :merge!, :dig
|
62
62
|
attr_reader :capsules
|
63
63
|
|
64
|
+
def inspect
|
65
|
+
"#<#{self.class.name} @options=#{
|
66
|
+
@options.except(:lifecycle_events, :reloader, :death_handlers, :error_handlers).inspect
|
67
|
+
}>"
|
68
|
+
end
|
69
|
+
|
64
70
|
def to_json(*)
|
65
71
|
Sidekiq.dump_json(@options)
|
66
72
|
end
|
data/lib/sidekiq/version.rb
CHANGED
data/lib/sidekiq/web/action.rb
CHANGED
@@ -27,6 +27,7 @@ module Sidekiq
|
|
27
27
|
redirect current_location
|
28
28
|
end
|
29
29
|
|
30
|
+
# deprecated, will warn in 8.0
|
30
31
|
def params
|
31
32
|
indifferent_hash = Hash.new { |hash, key| hash[key.to_s] if Symbol === key }
|
32
33
|
|
@@ -36,8 +37,19 @@ module Sidekiq
|
|
36
37
|
indifferent_hash
|
37
38
|
end
|
38
39
|
|
39
|
-
|
40
|
-
|
40
|
+
# Use like `url_params("page")` within your action blocks
|
41
|
+
def url_params(key)
|
42
|
+
request.params[key]
|
43
|
+
end
|
44
|
+
|
45
|
+
# Use like `route_params(:name)` within your action blocks
|
46
|
+
# key is required in 8.0, nil is only used for backwards compatibility
|
47
|
+
def route_params(key = nil)
|
48
|
+
if key
|
49
|
+
env[WebRouter::ROUTE_PARAMS][key]
|
50
|
+
else
|
51
|
+
env[WebRouter::ROUTE_PARAMS]
|
52
|
+
end
|
41
53
|
end
|
42
54
|
|
43
55
|
def session
|
@@ -184,7 +184,7 @@ module Sidekiq
|
|
184
184
|
end
|
185
185
|
|
186
186
|
post "/morgue" do
|
187
|
-
redirect(request.path) unless
|
187
|
+
redirect(request.path) unless url_params("key")
|
188
188
|
|
189
189
|
params["key"].each do |key|
|
190
190
|
job = Sidekiq::DeadSet.new.fetch(*parse_params(key)).first
|
@@ -207,7 +207,7 @@ module Sidekiq
|
|
207
207
|
end
|
208
208
|
|
209
209
|
post "/morgue/:key" do
|
210
|
-
key = route_params
|
210
|
+
key = route_params(:key)
|
211
211
|
halt(404) unless key
|
212
212
|
|
213
213
|
job = Sidekiq::DeadSet.new.fetch(*parse_params(key)).first
|
@@ -217,7 +217,7 @@ module Sidekiq
|
|
217
217
|
end
|
218
218
|
|
219
219
|
get "/retries" do
|
220
|
-
x =
|
220
|
+
x = url_params("substr")
|
221
221
|
|
222
222
|
if x && x != ""
|
223
223
|
@retries = search(Sidekiq::RetrySet.new, x)
|
data/lib/sidekiq/web/helpers.rb
CHANGED
@@ -111,7 +111,7 @@ module Sidekiq
|
|
111
111
|
if within.nil?
|
112
112
|
::Rack::Utils.escape_html(jid)
|
113
113
|
else
|
114
|
-
"<a href='#{root_path}
|
114
|
+
"<a href='#{root_path}#{within}?substr=#{jid}'>#{::Rack::Utils.escape_html(jid)}</a>"
|
115
115
|
end
|
116
116
|
end
|
117
117
|
|
@@ -184,7 +184,8 @@ module Sidekiq
|
|
184
184
|
|
185
185
|
# sidekiq/sidekiq#3243
|
186
186
|
def unfiltered?
|
187
|
-
|
187
|
+
s = url_params("substr")
|
188
|
+
yield unless s && s.size > 0
|
188
189
|
end
|
189
190
|
|
190
191
|
def get_locale
|
data/lib/sidekiq/web.rb
CHANGED
data/web/views/morgue.erb
CHANGED
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.3.
|
4
|
+
version: 7.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Perham
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis-client
|
@@ -232,7 +232,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
232
232
|
- !ruby/object:Gem::Version
|
233
233
|
version: '0'
|
234
234
|
requirements: []
|
235
|
-
rubygems_version: 3.5.
|
235
|
+
rubygems_version: 3.5.22
|
236
236
|
signing_key:
|
237
237
|
specification_version: 4
|
238
238
|
summary: Simple, efficient background processing for Ruby
|