sidekiq 8.1.2 → 8.1.3
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 +10 -0
- data/lib/sidekiq/capsule.rb +0 -1
- data/lib/sidekiq/cli.rb +1 -1
- data/lib/sidekiq/config.rb +1 -1
- data/lib/sidekiq/scheduled.rb +2 -5
- data/lib/sidekiq/version.rb +1 -1
- data/lib/sidekiq/web/helpers.rb +31 -2
- data/web/assets/stylesheets/style.css +2 -0
- data/web/locales/ar.yml +1 -1
- data/web/locales/fa.yml +1 -1
- data/web/locales/gd.yml +1 -1
- data/web/locales/he.yml +1 -1
- data/web/locales/pt-BR.yml +1 -1
- data/web/locales/ur.yml +1 -1
- data/web/views/_paging.html.erb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 205ebd1ee2e6fdbe27b860b06a03147e96d77a3abc32481eb3bbf51ce01a64a6
|
|
4
|
+
data.tar.gz: 355195d5aadd03117e7eee7bdf144d193a4c9a41d4534b5f05ea6fad847cb7df
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a592aa88c757173e70ee511388f15642e2aad1347df15252e972cea12e42ab91a0e8df702c3ff9e0069595bb68dae32a6d53318df390563a9ae7cc0df31852dd
|
|
7
|
+
data.tar.gz: d10b27d602e3c53fe79a85d21a59d0492831c32c8a67e2a344869c42e22e402ad591f82e3835e14c879a81fe8020430450fecd6a324d008bf33c4592dee23ea9
|
data/Changes.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
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
|
+
8.1.3
|
|
6
|
+
----------
|
|
7
|
+
|
|
8
|
+
- Fix edge case leading to duplicate, concurrent execution [#6379]
|
|
9
|
+
If 2 Capsules process jobs from the same queue, long-running
|
|
10
|
+
jobs could run in parallel during process shutdown.
|
|
11
|
+
- [SECURITY] Remove as much YAML usage as possible. [#6950]
|
|
12
|
+
Localization files in `web/locales` are now manually parsed.
|
|
13
|
+
Sidekiq::CLI will now only require YAML if you use a `-C` .yml file.
|
|
14
|
+
|
|
5
15
|
8.1.2
|
|
6
16
|
----------
|
|
7
17
|
|
data/lib/sidekiq/capsule.rb
CHANGED
data/lib/sidekiq/cli.rb
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
$stdout.sync = true
|
|
4
4
|
|
|
5
|
-
require "yaml"
|
|
6
5
|
require "optparse"
|
|
7
6
|
require "erb"
|
|
8
7
|
require "fileutils"
|
|
@@ -409,6 +408,7 @@ module Sidekiq # :nodoc:
|
|
|
409
408
|
def parse_config(path)
|
|
410
409
|
erb = ERB.new(File.read(path), trim_mode: "-")
|
|
411
410
|
erb.filename = File.expand_path(path)
|
|
411
|
+
require "yaml"
|
|
412
412
|
opts = YAML.safe_load(erb.result, permitted_classes: [Symbol], aliases: true) || {}
|
|
413
413
|
|
|
414
414
|
if opts.respond_to? :deep_symbolize_keys!
|
data/lib/sidekiq/config.rb
CHANGED
|
@@ -255,7 +255,7 @@ module Sidekiq
|
|
|
255
255
|
# Register a proc to handle any error which occurs within the Sidekiq process.
|
|
256
256
|
#
|
|
257
257
|
# Sidekiq.configure_server do |config|
|
|
258
|
-
# config.error_handlers << proc {|ex,ctx_hash| MyErrorService.notify(ex, ctx_hash) }
|
|
258
|
+
# config.error_handlers << proc {|ex,ctx_hash,config| MyErrorService.notify(ex, ctx_hash) }
|
|
259
259
|
# end
|
|
260
260
|
#
|
|
261
261
|
# The default error handler logs errors to @logger.
|
data/lib/sidekiq/scheduled.rb
CHANGED
|
@@ -117,9 +117,7 @@ module Sidekiq
|
|
|
117
117
|
private
|
|
118
118
|
|
|
119
119
|
def wait
|
|
120
|
-
@sleeper.pop(timeout: random_poll_interval)
|
|
121
|
-
rescue Timeout::Error
|
|
122
|
-
# TODO move to exception: false
|
|
120
|
+
@sleeper.pop(timeout: random_poll_interval, exception: false)
|
|
123
121
|
rescue => ex
|
|
124
122
|
# if poll_interval_average hasn't been calculated yet, we can
|
|
125
123
|
# raise an error trying to reach Redis.
|
|
@@ -225,8 +223,7 @@ module Sidekiq
|
|
|
225
223
|
total += INITIAL_WAIT unless @config[:poll_interval_average]
|
|
226
224
|
total += (5 * rand)
|
|
227
225
|
|
|
228
|
-
@sleeper.pop(timeout: total)
|
|
229
|
-
rescue Timeout::Error
|
|
226
|
+
@sleeper.pop(timeout: total, exception: false)
|
|
230
227
|
ensure
|
|
231
228
|
# periodically clean out the `processes` set in Redis which can collect
|
|
232
229
|
# references to dead processes over time. The process count affects how
|
data/lib/sidekiq/version.rb
CHANGED
data/lib/sidekiq/web/helpers.rb
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "uri"
|
|
4
|
-
require "yaml"
|
|
5
4
|
require "cgi/escape"
|
|
6
5
|
|
|
7
6
|
module Sidekiq
|
|
@@ -73,12 +72,42 @@ module Sidekiq
|
|
|
73
72
|
# so extensions can be localized
|
|
74
73
|
@@strings[lang] ||= config.locales.each_with_object({}) do |path, global|
|
|
75
74
|
find_locale_files(lang).each do |file|
|
|
76
|
-
strs =
|
|
75
|
+
strs = parse_yaml_new(file)
|
|
77
76
|
global.merge!(strs[lang])
|
|
78
77
|
end
|
|
79
78
|
end
|
|
80
79
|
end
|
|
81
80
|
|
|
81
|
+
def parse_yaml_old(path)
|
|
82
|
+
require "yaml"
|
|
83
|
+
YAML.safe_load_file(path)
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
def parse_yaml_new(path)
|
|
87
|
+
locale = nil
|
|
88
|
+
map = {}
|
|
89
|
+
IO.readlines(path, chomp: true).each do |line|
|
|
90
|
+
case line
|
|
91
|
+
when /\A\s*\#.*/
|
|
92
|
+
# line comment
|
|
93
|
+
when !locale && /\A([a-zA-Z\-_]+):/
|
|
94
|
+
locale = $1
|
|
95
|
+
map[locale] = {}
|
|
96
|
+
when /\A\s+(\w+):\s+(.+)\z/
|
|
97
|
+
# A few values have double quotes to include special characters in YAML.
|
|
98
|
+
# Strip them off manually as our greedy match will include them.
|
|
99
|
+
key = $1
|
|
100
|
+
s = $2
|
|
101
|
+
s = s[1..] if s[0] == "\""
|
|
102
|
+
s = s[0..-2] if s[-1] == "\""
|
|
103
|
+
map[locale][key] = s
|
|
104
|
+
else
|
|
105
|
+
raise ArgumentError, "unable to parse #{path}: #{line}"
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
map
|
|
109
|
+
end
|
|
110
|
+
|
|
82
111
|
def to_json(x)
|
|
83
112
|
Sidekiq.dump_json(x)
|
|
84
113
|
end
|
|
@@ -534,6 +534,8 @@ input[type="checkbox"] { accent-color: var(--color-primary); }
|
|
|
534
534
|
|
|
535
535
|
.pagination a { text-decoration: none; }
|
|
536
536
|
|
|
537
|
+
.pagination .active a { color: var(--color-primary); font-weight: 700; }
|
|
538
|
+
|
|
537
539
|
.pagination .disabled { opacity: 0.3; }
|
|
538
540
|
|
|
539
541
|
div:has(.pagination.pull-right) { margin-left: auto; }
|
data/web/locales/ar.yml
CHANGED
data/web/locales/fa.yml
CHANGED
data/web/locales/gd.yml
CHANGED
data/web/locales/he.yml
CHANGED
data/web/locales/pt-BR.yml
CHANGED
data/web/locales/ur.yml
CHANGED
data/web/views/_paging.html.erb
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<a href="<%= url %>?<%= qparams(page: @current_page - 1) %>"><%= @current_page - 1 %></a>
|
|
11
11
|
</li>
|
|
12
12
|
<% end %>
|
|
13
|
-
<li class="
|
|
13
|
+
<li class="active">
|
|
14
14
|
<a href="<%= url %>?<%= qparams(page: @current_page) %>"><%= @current_page %></a>
|
|
15
15
|
</li>
|
|
16
16
|
<% if @total_size > @current_page * @count %>
|