sidekiq 7.0.0 โ†’ 7.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c6762c97172b3f8e4b7cc1fd940756ee8796faf70ece8d5e9ede9e2dc7797fe
4
- data.tar.gz: 905e0e1f381e1c40832ab2137589161fcccfb63c847ad36c9cca15765d952659
3
+ metadata.gz: 9456d6050f916f7777b11ff32528c3c872fefa5a4e7afa32773e030ca9b6df7e
4
+ data.tar.gz: 501ca5569b669bb5c5eaf80d4ae3c1c8cc20e7c51235cfc72abcb2d3b25bc6ea
5
5
  SHA512:
6
- metadata.gz: acfc9bb74585cc65ad1af27e263668ec154ac791baa99de2a1542cfe462a7b13544a758a7bd574d623088c9e683f705437cc4e4495f05e57770037d030214a44
7
- data.tar.gz: 31320e6cd2fab0d253f3a32616f51360c4ad6a9ef30acef5f88a6ccc6eaf75e04b76ea12dd053dd29442d96fa49234f65e14801e7600cf0f300c023d75aecf43
6
+ metadata.gz: 0267fbbfbf028e4f9c091e28c31b4b18de6c795e32359c38cf2f09da7c2bc43654c1b3482443befbaada0715fdb591ae74037bed99069bd26db5fca961befec1
7
+ data.tar.gz: f2a5275b2fa2a47e1aa0b6d5a5009cc373dddd64f0226d481f575079fee6a91ebc8ddacfc96536085df9bae685bf45fd42660eecf656d07521033b921f8125ed
data/Changes.md CHANGED
@@ -2,7 +2,36 @@
2
2
 
3
3
  [Sidekiq Changes](https://github.com/mperham/sidekiq/blob/main/Changes.md) | [Sidekiq Pro Changes](https://github.com/mperham/sidekiq/blob/main/Pro-Changes.md) | [Sidekiq Enterprise Changes](https://github.com/mperham/sidekiq/blob/main/Ent-Changes.md)
4
4
 
5
- main
5
+ 7.0.2
6
+ ----------
7
+
8
+ - Improve compatibility with custom loggers [#5673]
9
+ - Add queue weights on Busy page [#5640]
10
+ - Add BID link on job_info page if job is part of a Batch [#5623]
11
+ - Allow custom extensions to add rows/links within Job detail pages [#5624]
12
+ ```ruby
13
+ Sidekiq::Web.custom_job_info_rows << AddAccountLink.new
14
+
15
+ class AddAccountLink
16
+ include CGI::Util
17
+ def add_pair(job)
18
+ # yield a (name, value) pair
19
+ # You can include HTML tags and CSS, Sidekiq does not do any
20
+ # escaping so beware user data injection! Note how we use CGI's
21
+ # `h` escape helper.
22
+ aid = job["account_id"]
23
+ yield "Account", "<a href='/accounts/#{h aid}'>#{h aid}</a>" if aid
24
+ end
25
+ end
26
+ ```
27
+
28
+ 7.0.1
29
+ ----------
30
+
31
+ - Allow an embedding process to reuse its own heartbeat thread
32
+ - Update zh-cn localization
33
+
34
+ 7.0.0
6
35
  ----------
7
36
 
8
37
  - Embedded mode!
@@ -10,13 +39,13 @@ main
10
39
  - Job Execution metrics!!!
11
40
  - See `docs/7.0-Upgrade.md` for release notes
12
41
 
13
- 6-x
42
+ 6.5.8
14
43
  ----------
15
44
 
45
+ - Fail if using a bad version of scout_apm [#5616]
16
46
  - Add pagination to Busy page [#5556]
17
47
  - Speed up WorkSet#each [#5559]
18
- - Adjust CurrentAttributes to work with the String class name so we aren't referencing
19
- the Class within a Rails initializer [#5536]
48
+ - Adjust CurrentAttributes to work with the String class name so we aren't referencing the Class within a Rails initializer [#5536]
20
49
 
21
50
  6.5.7
22
51
  ----------
data/lib/sidekiq/api.rb CHANGED
@@ -418,6 +418,10 @@ module Sidekiq
418
418
  self["jid"]
419
419
  end
420
420
 
421
+ def bid
422
+ self["bid"]
423
+ end
424
+
421
425
  def enqueued_at
422
426
  self["enqueued_at"] ? Time.at(self["enqueued_at"]).utc : nil
423
427
  end
@@ -967,6 +971,14 @@ module Sidekiq
967
971
  self["queues"]
968
972
  end
969
973
 
974
+ def weights
975
+ self["weights"]
976
+ end
977
+
978
+ def version
979
+ self["version"]
980
+ end
981
+
970
982
  # Signal this process to stop processing new jobs.
971
983
  # It will continue to execute jobs it has already fetched.
972
984
  # This method is *asynchronous* and it can take 5-10
@@ -189,7 +189,7 @@ module Sidekiq
189
189
  def enqueue_to_in(queue, interval, klass, *args)
190
190
  int = interval.to_f
191
191
  now = Time.now.to_f
192
- ts = (int < 1_000_000_000 ? now + int : int)
192
+ ts = ((int < 1_000_000_000) ? now + int : int)
193
193
 
194
194
  item = {"class" => klass, "args" => args, "at" => ts, "queue" => queue}
195
195
  item.delete("at") if ts <= now
@@ -134,7 +134,7 @@ module Sidekiq
134
134
 
135
135
  def redis_info
136
136
  redis do |conn|
137
- conn.info
137
+ conn.call("INFO") { |i| i.lines(chomp: true).map { |l| l.split(":", 2) }.select { |l| l.size == 2 }.to_h }
138
138
  rescue RedisClientAdapter::CommandError => ex
139
139
  # 2850 return fake version when INFO command has (probably) been renamed
140
140
  raise unless /unknown command/.match?(ex.message)
@@ -248,7 +248,6 @@ module Sidekiq
248
248
  return
249
249
  end
250
250
 
251
- logger.extend(Sidekiq::LoggingUtils)
252
251
  @logger = logger
253
252
  end
254
253
 
@@ -21,15 +21,15 @@ module Sidekiq
21
21
  }
22
22
 
23
23
  def self.mark!(label = nil)
24
- label ||= LABEL_MAKER.call
25
- Sidekiq::Deploy.new.mark(label: label)
24
+ Sidekiq::Deploy.new.mark!(label: label)
26
25
  end
27
26
 
28
27
  def initialize(pool = Sidekiq::RedisConnection.create)
29
28
  @pool = pool
30
29
  end
31
30
 
32
- def mark(at: Time.now, label: "")
31
+ def mark!(at: Time.now, label: nil)
32
+ label ||= LABEL_MAKER.call
33
33
  # we need to round the timestamp so that we gracefully
34
34
  # handle an very common error in marking deploys:
35
35
  # having every process mark its deploy, leading
@@ -15,9 +15,9 @@ module Sidekiq
15
15
  fire_event(:startup, reverse: false, reraise: true)
16
16
  @launcher = Sidekiq::Launcher.new(@config, embedded: true)
17
17
  @launcher.run
18
- sleep 0.1 # pause to give threads time to spin up
18
+ sleep 0.2 # pause to give threads time to spin up
19
19
 
20
- logger.info "Embedded mode running with #{Thread.list.size} threads"
20
+ logger.info "Sidekiq running embedded, total process thread count: #{Thread.list.size}"
21
21
  logger.debug { Thread.list.map(&:name) }
22
22
  end
23
23
 
data/lib/sidekiq/job.rb CHANGED
@@ -258,7 +258,7 @@ module Sidekiq
258
258
  def at(interval)
259
259
  int = interval.to_f
260
260
  now = Time.now.to_f
261
- ts = (int < 1_000_000_000 ? now + int : int)
261
+ ts = ((int < 1_000_000_000) ? now + int : int)
262
262
  # Optimization to enqueue something now that is scheduled to go out now or in the past
263
263
  @opts["at"] = ts if ts > now
264
264
  self
@@ -325,7 +325,7 @@ module Sidekiq
325
325
  def perform_in(interval, *args)
326
326
  int = interval.to_f
327
327
  now = Time.now.to_f
328
- ts = (int < 1_000_000_000 ? now + int : int)
328
+ ts = ((int < 1_000_000_000) ? now + int : int)
329
329
 
330
330
  item = {"class" => self, "args" => args}
331
331
 
@@ -33,7 +33,7 @@ module Sidekiq
33
33
 
34
34
  Thread.current[:sidekiq_context] = h
35
35
  level = job_hash["log_level"]
36
- if level
36
+ if level && @logger.respond_to?(:log_at)
37
37
  @logger.log_at(level, &block)
38
38
  else
39
39
  yield
@@ -32,15 +32,17 @@ module Sidekiq
32
32
  @done = false
33
33
  end
34
34
 
35
- def run
35
+ # Start this Sidekiq instance. If an embedding process already
36
+ # has a heartbeat thread, caller can use `async_beat: false`
37
+ # and instead have thread call Launcher#heartbeat every N seconds.
38
+ def run(async_beat: true)
36
39
  Sidekiq.freeze!
37
- @thread = safe_thread("heartbeat", &method(:start_heartbeat))
40
+ @thread = safe_thread("heartbeat", &method(:start_heartbeat)) if async_beat
38
41
  @poller.start
39
42
  @managers.each(&:start)
40
43
  end
41
44
 
42
45
  # Stops this instance from processing any more jobs,
43
- #
44
46
  def quiet
45
47
  return if @done
46
48
 
@@ -71,18 +73,30 @@ module Sidekiq
71
73
  @done
72
74
  end
73
75
 
76
+ # If embedding Sidekiq, you can have the process heartbeat
77
+ # call this method to regularly heartbeat rather than creating
78
+ # a separate thread.
79
+ def heartbeat
80
+ โค
81
+ end
82
+
74
83
  private unless $TESTING
75
84
 
76
85
  BEAT_PAUSE = 10
77
86
 
78
87
  def start_heartbeat
79
88
  loop do
80
- heartbeat
89
+ beat
81
90
  sleep BEAT_PAUSE
82
91
  end
83
92
  logger.info("Heartbeat stopping...")
84
93
  end
85
94
 
95
+ def beat
96
+ $0 = PROCTITLES.map { |proc| proc.call(self, to_data) }.compact.join(" ") unless @embedded
97
+ โค
98
+ end
99
+
86
100
  def clear_heartbeat
87
101
  flush_stats
88
102
 
@@ -99,12 +113,6 @@ module Sidekiq
99
113
  # best effort, ignore network errors
100
114
  end
101
115
 
102
- def heartbeat
103
- $0 = PROCTITLES.map { |proc| proc.call(self, to_data) }.compact.join(" ") unless @embedded
104
-
105
- โค
106
- end
107
-
108
116
  def flush_stats
109
117
  fails = Processor::FAILURE.reset
110
118
  procd = Processor::PROCESSED.reset
@@ -242,9 +250,11 @@ module Sidekiq
242
250
  "pid" => ::Process.pid,
243
251
  "tag" => @config[:tag] || "",
244
252
  "concurrency" => @config.total_concurrency,
245
- "queues" => @config.capsules.values.map { |cap| cap.queues }.flatten.uniq,
253
+ "queues" => @config.capsules.values.flat_map { |cap| cap.queues }.uniq,
254
+ "weights" => @config.capsules.values.flat_map { |cap| cap.queues }.tally,
246
255
  "labels" => @config[:labels].to_a,
247
- "identity" => identity
256
+ "identity" => identity,
257
+ "version" => Sidekiq::VERSION
248
258
  }
249
259
  end
250
260
 
@@ -123,7 +123,7 @@ module Sidekiq
123
123
  def series_avg(metric = "ms")
124
124
  series[metric].each_with_object(Hash.new(0)) do |(bucket, value), result|
125
125
  completed = series.dig("p", bucket) - series.dig("f", bucket)
126
- result[bucket] = completed == 0 ? 0 : value.to_f / completed
126
+ result[bucket] = (completed == 0) ? 0 : value.to_f / completed
127
127
  end
128
128
  end
129
129
  end
@@ -49,10 +49,25 @@ class Sidekiq::Monitor
49
49
  def processes
50
50
  puts "---- Processes (#{process_set.size}) ----"
51
51
  process_set.each_with_index do |process, index|
52
+ # Keep compatibility with legacy versions since we don't want to break sidekiqmon during rolling upgrades or downgrades.
53
+ #
54
+ # Before:
55
+ # ["default", "critical"]
56
+ #
57
+ # After:
58
+ # {"default" => 1, "critical" => 10}
59
+ queues =
60
+ if process["weights"]
61
+ process["weights"].sort_by { |queue| queue[0] }.map { |queue| queue.join(": ") }
62
+ else
63
+ process["queues"].sort
64
+ end
65
+
52
66
  puts "#{process["identity"]} #{tags_for(process)}"
53
67
  puts " Started: #{Time.at(process["started_at"])} (#{time_ago(process["started_at"])})"
54
68
  puts " Threads: #{process["concurrency"]} (#{process["busy"]} busy)"
55
- puts " Queues: #{split_multiline(process["queues"].sort, pad: 11)}"
69
+ puts " Queues: #{split_multiline(queues, pad: 11)}"
70
+ puts " Version: #{process["version"] || "Unknown"}" if process["version"] != Sidekiq::VERSION
56
71
  puts "" unless (index + 1) == process_set.size
57
72
  end
58
73
  end
@@ -101,7 +116,7 @@ class Sidekiq::Monitor
101
116
  tags = [
102
117
  process["tag"],
103
118
  process["labels"],
104
- (process["quiet"] == "true" ? "quiet" : nil)
119
+ ((process["quiet"] == "true") ? "quiet" : nil)
105
120
  ].flatten.compact
106
121
  tags.any? ? "[#{tags.join("] [")}]" : nil
107
122
  end
@@ -3,7 +3,7 @@
3
3
  module Sidekiq
4
4
  module Paginator
5
5
  def page(key, pageidx = 1, page_size = 25, opts = nil)
6
- current_page = pageidx.to_i < 1 ? 1 : pageidx.to_i
6
+ current_page = (pageidx.to_i < 1) ? 1 : pageidx.to_i
7
7
  pageidx = current_page - 1
8
8
  total_size = 0
9
9
  items = []
@@ -45,7 +45,7 @@ module Sidekiq
45
45
  end
46
46
 
47
47
  def page_items(items, pageidx = 1, page_size = 25)
48
- current_page = pageidx.to_i < 1 ? 1 : pageidx.to_i
48
+ current_page = (pageidx.to_i < 1) ? 1 : pageidx.to_i
49
49
  pageidx = current_page - 1
50
50
  starting = pageidx * page_size
51
51
  items = items.to_a
@@ -9,10 +9,12 @@ module Sidekiq
9
9
  CommandError = RedisClient::CommandError
10
10
 
11
11
  module CompatMethods
12
+ # TODO Deprecate and remove this
12
13
  def info
13
14
  @client.call("INFO") { |i| i.lines(chomp: true).map { |l| l.split(":", 2) }.select { |l| l.size == 2 }.to_h }
14
15
  end
15
16
 
17
+ # TODO Deprecate and remove this
16
18
  def evalsha(sha, keys, argv)
17
19
  @client.call("EVALSHA", sha, keys.size, *keys, *argv)
18
20
  end
@@ -34,12 +36,7 @@ module Sidekiq
34
36
  CompatClient = RedisClient::Decorator.create(CompatMethods)
35
37
 
36
38
  class CompatClient
37
- # underscore methods are not official API
38
- def _client
39
- @client
40
- end
41
-
42
- def _config
39
+ def config
43
40
  @client.config
44
41
  end
45
42
 
@@ -54,7 +54,7 @@ module Sidekiq
54
54
  @lua_zpopbyscore_sha = conn.script(:load, LUA_ZPOPBYSCORE)
55
55
  end
56
56
 
57
- conn.evalsha(@lua_zpopbyscore_sha, keys, argv)
57
+ conn.call("EVALSHA", @lua_zpopbyscore_sha, keys.size, *keys, *argv)
58
58
  rescue RedisClient::CommandError => e
59
59
  raise unless e.message.start_with?("NOSCRIPT")
60
60
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sidekiq
4
- VERSION = "7.0.0"
4
+ VERSION = "7.0.2"
5
5
  MAJOR = 7
6
6
  end
@@ -137,7 +137,7 @@ module Sidekiq
137
137
  end
138
138
 
139
139
  def sort_direction_label
140
- params[:direction] == "asc" ? "&uarr;" : "&darr;"
140
+ (params[:direction] == "asc") ? "&uarr;" : "&darr;"
141
141
  end
142
142
 
143
143
  def workset
@@ -167,7 +167,7 @@ module Sidekiq
167
167
 
168
168
  def redis_url
169
169
  Sidekiq.redis do |conn|
170
- conn._config.server_url
170
+ conn.config.server_url
171
171
  end
172
172
  end
173
173
 
@@ -184,7 +184,7 @@ module Sidekiq
184
184
  end
185
185
 
186
186
  def current_status
187
- workset.size == 0 ? "idle" : "active"
187
+ (workset.size == 0) ? "idle" : "active"
188
188
  end
189
189
 
190
190
  def relative_time(time)
@@ -217,7 +217,7 @@ module Sidekiq
217
217
  end
218
218
 
219
219
  def truncate(text, truncate_after_chars = 2000)
220
- truncate_after_chars && text.size > truncate_after_chars ? "#{text[0..truncate_after_chars]}..." : text
220
+ (truncate_after_chars && text.size > truncate_after_chars) ? "#{text[0..truncate_after_chars]}..." : text
221
221
  end
222
222
 
223
223
  def display_args(args, truncate_after_chars = 2000)
@@ -323,6 +323,10 @@ module Sidekiq
323
323
  Time.now.utc.strftime("%H:%M:%S UTC")
324
324
  end
325
325
 
326
+ def pollable?
327
+ !(current_path == "" || current_path.start_with?("metrics"))
328
+ end
329
+
326
330
  def retry_or_delete_or_kill(job, params)
327
331
  if params["retry"]
328
332
  job.retry
data/lib/sidekiq/web.rb CHANGED
@@ -48,6 +48,10 @@ module Sidekiq
48
48
  end
49
49
  alias_method :tabs, :custom_tabs
50
50
 
51
+ def custom_job_info_rows
52
+ @custom_job_info_rows ||= []
53
+ end
54
+
51
55
  def locales
52
56
  @locales ||= LOCALES
53
57
  end
data/sidekiq.gemspec CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |gem|
22
22
  "source_code_uri" => "https://github.com/mperham/sidekiq"
23
23
  }
24
24
 
25
- gem.add_dependency "redis-client", ">= 0.9.0"
25
+ gem.add_dependency "redis-client", ">= 0.11.0"
26
26
  gem.add_dependency "connection_pool", ">= 2.3.0"
27
27
  gem.add_dependency "rack", ">= 2.2.4"
28
28
  gem.add_dependency "concurrent-ruby", "< 2"
@@ -41,9 +41,7 @@ Gem::Specification.new do |gem|
41
41
  โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ โ–‘โ–‘โ–‘โ–‘โ–‘ โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ โ–‘โ–‘โ–‘โ–‘โ–‘ โ–‘โ–‘โ–‘โ–‘ โ–‘โ–‘โ–‘โ–‘โ–‘ โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ โ–‘โ–‘ โ–‘โ–‘โ–‘ โ–‘โ–‘ โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘
42
42
 
43
43
 
44
- WARNING: This is a beta release, expect breakage!
45
-
46
- 1. Use `gem 'sidekiq', '<7'` in your Gemfile if you don't want to be a beta tester.
44
+ 1. Use `gem 'sidekiq', '<7'` in your Gemfile if you don't want this new version.
47
45
  2. Read the release notes at https://github.com/mperham/sidekiq/blob/main/docs/7.0-Upgrade.md
48
46
  3. Search for open/closed issues at https://github.com/mperham/sidekiq/issues/
49
47
 
@@ -31,6 +31,7 @@ function addListeners() {
31
31
  node.addEventListener("click", addDataToggleListeners)
32
32
  })
33
33
 
34
+ addShiftClickListeners()
34
35
  updateFuzzyTimes();
35
36
  setLivePollFromUrl();
36
37
 
@@ -71,6 +72,23 @@ function addDataToggleListeners(event) {
71
72
  }
72
73
  }
73
74
 
75
+ function addShiftClickListeners() {
76
+ let checkboxes = Array.from(document.querySelectorAll(".shift_clickable"));
77
+ let lastChecked = null;
78
+ checkboxes.forEach(checkbox => {
79
+ checkbox.addEventListener("click", (e) => {
80
+ if (e.shiftKey && lastChecked) {
81
+ let myIndex = checkboxes.indexOf(checkbox);
82
+ let lastIndex = checkboxes.indexOf(lastChecked);
83
+ let [min, max] = [myIndex, lastIndex].sort();
84
+ let newState = checkbox.checked;
85
+ checkboxes.slice(min, max).forEach(c => c.checked = newState);
86
+ }
87
+ lastChecked = checkbox;
88
+ });
89
+ });
90
+ }
91
+
74
92
  function updateFuzzyTimes() {
75
93
  var locale = document.body.getAttribute("data-locale");
76
94
  var parts = locale.split('-');
@@ -72,6 +72,10 @@ table {
72
72
  background-color: #31708f;
73
73
  }
74
74
 
75
+ .alert-warning {
76
+ background-color: #c47612;
77
+ }
78
+
75
79
  a:link, a:active, a:hover, a:visited {
76
80
  color: #ddd;
77
81
  }
@@ -676,8 +676,8 @@ div.interval-slider input {
676
676
  }
677
677
 
678
678
  .info-circle {
679
- color: #ccc;
680
- background-color: #000;
679
+ color: #333;
680
+ background-color: #ccc;
681
681
  border-radius: 50%;
682
682
  text-align: center;
683
683
  vertical-align: middle;
@@ -32,23 +32,22 @@ zh-cn: # <---- change this to your locale code
32
32
  Size: ๅฎน้‡
33
33
  Actions: ๅŠจไฝœ
34
34
  NextRetry: ไธ‹ๆฌก้‡่ฏ•
35
- RetryCount: ้‡่ฏ•ๆฌกๆ•ธ
35
+ RetryCount: ้‡่ฏ•ๆฌกๆ•ฐ
36
36
  RetryNow: ็Žฐๅœจ้‡่ฏ•
37
37
  Kill: ็ปˆๆญข
38
- LastRetry: ๆœ€ๅŽไธ€ๆฌก้‡่ฏ•
39
- OriginallyFailed: ๅŽŸๆœฌๅทฒๅคฑ่ดฅ
38
+ LastRetry: ไธŠๆฌก้‡่ฏ•
39
+ OriginallyFailed: ้ฆ–ๆฌกๅคฑ่ดฅ
40
40
  AreYouSure: ไฝ ็กฎๅฎš๏ผŸ
41
41
  DeleteAll: ๅ…จ้ƒจๅˆ ้™ค
42
42
  RetryAll: ๅ…จ้ƒจ้‡่ฏ•
43
43
  KillAll: ๅ…จ้ƒจ็ปˆๆญข
44
- NoRetriesFound: ๆฒ’ๆœ‰ๅ‘็Žฐๅฏ้‡่ฏ•
44
+ NoRetriesFound: ๆฒกๆœ‰ๅ‘็Žฐๅฏ้‡่ฏ•
45
45
  Error: ้”™่ฏฏ
46
- ErrorBacktrace: ้”™่ฏฏ็š„ๅ›ž่ฐƒ่ฟฝ่ธช
47
46
  ErrorClass: ้”™่ฏฏ็ฑปๅˆซ
48
47
  ErrorMessage: ้”™่ฏฏๆถˆๆฏ
49
48
  ErrorBacktrace: ้”™่ฏฏ็ป†่Š‚
50
49
  GoBack: โ† ่ฟ”ๅ›ž
51
- NoScheduledFound: ๆฒ’ๆœ‰ๅ‘็Žฐ่ฎกๅˆ’ไปปๅŠก
50
+ NoScheduledFound: ๆฒกๆœ‰ๅ‘็Žฐ่ฎกๅˆ’ไปปๅŠก
52
51
  When: ๅฝ“
53
52
  ScheduledJobs: ่ฎกๅˆ’ไปปๅŠก
54
53
  idle: ้—ฒ็ฝฎ
@@ -64,26 +63,26 @@ zh-cn: # <---- change this to your locale code
64
63
  SixMonths: ๅ…ญไธชๆœˆ
65
64
  Failures: ๅคฑ่ดฅ
66
65
  DeadJobs: ๅทฒๅœๆปžไปปๅŠก
67
- NoDeadJobsFound: ๆฒ’ๆœ‰ๅ‘็Žฐไปปไฝ•ๅทฒๅœๆปž็š„ไปปๅŠก
66
+ NoDeadJobsFound: ๆฒกๆœ‰ๅ‘็Žฐไปปไฝ•ๅทฒๅœๆปž็š„ไปปๅŠก
68
67
  Dead: ๅทฒๅœๆปž
69
68
  Process: ่ฟ›็จ‹
70
- Processes: ๅค„็†ไธญ
69
+ Processes: ่ฟ›็จ‹
71
70
  Name: ๅ็งฐ
72
71
  Thread: ็บฟ็จ‹
73
72
  Threads: ็บฟ็จ‹
74
73
  Jobs: ไปปๅŠก
75
- Paused: ๅทฒๆšซๅœ
76
- Stop: ๅผทๅˆถๆšซๅœ
77
- Quiet: ๆšซๅœ
78
- StopAll: ๅ…จ้ƒจๅผทๅˆถๆšซๅœ
79
- QuietAll: ๅ…จ้ƒจๆšซๅœ
80
- PollingInterval: ่ผช่ฉข้€ฑๆœŸ
81
- Plugins: ๅฅ—ไปถ
82
- NotYetEnqueued: ๅฐšๆœช้€ฒๅ…ฅไฝ‡ๅˆ—
83
- CreatedAt: ๅปบ็ซ‹ๆ™‚้–“
74
+ Paused: ๅทฒๆš‚ๅœ
75
+ Stop: ๅผบๅˆถๆš‚ๅœ
76
+ Quiet: ๆš‚ๅœ
77
+ StopAll: ๅ…จ้ƒจๅผบๅˆถๆš‚ๅœ
78
+ QuietAll: ๅ…จ้ƒจๆš‚ๅœ
79
+ PollingInterval: ่ฝฎ่ฏขๅ‘จๆœŸ
80
+ Plugins: ๆ’ไปถ
81
+ NotYetEnqueued: ๅฐšๆœช่ฟ›ๅ…ฅ้˜Ÿๅˆ—
82
+ CreatedAt: ๅปบ็ซ‹ๆ—ถ้—ด
84
83
  BackToApp: ๅ›ž้ฆ–้ 
85
- Latency: ๅปถๆ™‚
86
- Pause: ๆšซๅœ
84
+ Latency: ๅปถ่ฟŸ
85
+ Pause: ๆš‚ๅœ
87
86
  Unpause: ๅ–ๆถˆๆš‚ๅœ
88
87
  Metrics: ๆŒ‡ๆ ‡
89
88
  NoDataFound: ๆ— ๆ•ฐๆฎ
@@ -92,3 +91,5 @@ zh-cn: # <---- change this to your locale code
92
91
  Context: ไธŠไธ‹ๆ–‡
93
92
  Bucket: ๆกถ
94
93
  NoJobMetricsFound: ๆ— ไปปๅŠก็›ธๅ…ณๆŒ‡ๆ ‡ๆ•ฐๆฎ
94
+ Success: ๆˆๅŠŸ
95
+ Failure: ๅคฑ่ดฅ
@@ -33,6 +33,14 @@
33
33
  <code><%= job.jid %></code>
34
34
  </td>
35
35
  </tr>
36
+ <% if job.bid %>
37
+ <tr>
38
+ <th>BID</th>
39
+ <td>
40
+ <a href="<%= root_path %>batches/<%= job.bid %>"><%= job.bid %>
41
+ </td>
42
+ </tr>
43
+ <% end %>
36
44
  <tr>
37
45
  <th><%= t('CreatedAt') %></th>
38
46
  <td><%= relative_time(job.created_at) %></td>
@@ -84,6 +92,14 @@
84
92
  <td><%= relative_time(job.at) if job['retry_count'] %></td>
85
93
  </tr>
86
94
  <% end %>
95
+ <% Sidekiq::Web.custom_job_info_rows.each do |helper| %>
96
+ <% helper.add_pair(job) do |name, value| %>
97
+ <tr>
98
+ <th><%= name %></th>
99
+ <td><%= value %></td>
100
+ </tr>
101
+ <% end %>
102
+ <% end %>
87
103
  </tbody>
88
104
  </table>
89
105
  </div>
@@ -1,4 +1,4 @@
1
- <% if current_path != '' %>
1
+ <% if pollable? %>
2
2
  <a class="live-poll-start live-poll btn btn-primary"><%= t('LivePoll') %></a>
3
3
  <a class="live-poll-stop live-poll btn btn-primary active"><%= t('StopPolling') %></a>
4
4
  <% end %>
data/web/views/busy.erb CHANGED
@@ -70,7 +70,20 @@
70
70
  <% end %>
71
71
  <br>
72
72
  <b><%= "#{t('Queues')}: " %></b>
73
- <%= process.queues.join(", ") %>
73
+ <% if process.weights %>
74
+ <%= process.weights.sort_by { |weight| weight[0] }.map { |weight| weight.join(": ") }.join(", ") %>
75
+ <% else %>
76
+ <%= process.queues.sort.join(", ") %>
77
+ <% end %>
78
+ <% if process.version != Sidekiq::VERSION %>
79
+ <br>
80
+ <b><%= "#{t('Version')}: " %></b>
81
+ <% if process.version %>
82
+ <%= process.version %>
83
+ <% else %>
84
+ <%= t('Unknown') %>
85
+ <% end %>
86
+ <% end %>
74
87
  </td>
75
88
  <td><%= relative_time(Time.at(process['started_at'])) %></td>
76
89
  <td><%= format_memory(process['rss'].to_i) %></td>
data/web/views/morgue.erb CHANGED
@@ -33,7 +33,7 @@
33
33
  <tr>
34
34
  <td class="table-checkbox">
35
35
  <label>
36
- <input type='checkbox' name='key[]' value='<%= job_params(entry.item, entry.score) %>' />
36
+ <input type='checkbox' name='key[]' value='<%= job_params(entry.item, entry.score) %>' class='shift_clickable' />
37
37
  </label>
38
38
  </td>
39
39
  <td>
@@ -34,7 +34,7 @@
34
34
  <tr>
35
35
  <td class="table-checkbox">
36
36
  <label>
37
- <input type='checkbox' name='key[]' value='<%= job_params(entry.item, entry.score) %>' />
37
+ <input type='checkbox' name='key[]' value='<%= job_params(entry.item, entry.score) %>' class='shift_clickable' />
38
38
  </label>
39
39
  </td>
40
40
  <td>
@@ -30,7 +30,7 @@
30
30
  <% @scheduled.each do |entry| %>
31
31
  <tr>
32
32
  <td>
33
- <input type='checkbox' name='key[]' value='<%= job_params(entry.item, entry.score) %>' />
33
+ <input type='checkbox' name='key[]' value='<%= job_params(entry.item, entry.score) %>' class='shift_clickable' />
34
34
  </td>
35
35
  <td>
36
36
  <a href="<%= root_path %>scheduled/<%= job_params(entry.item, entry.score) %>"><%= relative_time(entry.at) %></a>
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.0
4
+ version: 7.0.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: 2022-10-27 00:00:00.000000000 Z
11
+ date: 2022-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis-client
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.9.0
19
+ version: 0.11.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.9.0
26
+ version: 0.11.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: connection_pool
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -219,9 +219,7 @@ post_install_message: |2
219
219
  โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ โ–‘โ–‘โ–‘โ–‘โ–‘ โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ โ–‘โ–‘โ–‘โ–‘โ–‘ โ–‘โ–‘โ–‘โ–‘ โ–‘โ–‘โ–‘โ–‘โ–‘ โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ โ–‘โ–‘ โ–‘โ–‘โ–‘ โ–‘โ–‘ โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘
220
220
 
221
221
 
222
- WARNING: This is a beta release, expect breakage!
223
-
224
- 1. Use `gem 'sidekiq', '<7'` in your Gemfile if you don't want to be a beta tester.
222
+ 1. Use `gem 'sidekiq', '<7'` in your Gemfile if you don't want this new version.
225
223
  2. Read the release notes at https://github.com/mperham/sidekiq/blob/main/docs/7.0-Upgrade.md
226
224
  3. Search for open/closed issues at https://github.com/mperham/sidekiq/issues/
227
225