sidekiq 7.0.0.beta1 → 7.0.1

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: 31722cec9da8b32488242bbcf40b46f3e2eaf8f9e5f5acefb4be306e6a3521e1
4
- data.tar.gz: 625639dd35227dd5c9e36d04e93afbb3f8ae6372c532625453a0d681fac19a65
3
+ metadata.gz: 98aab60f0a9bd14122cf62b2f31c17e41b67feb8c9fb13865ef0a16002d38ed7
4
+ data.tar.gz: 94038f0176ccb7785c6112cd41e915e4a1c7f66298a9670457a68e6b62f2710c
5
5
  SHA512:
6
- metadata.gz: 9471e077c2122b7b8fe94d075d1203d83d463608485852237ede31f9307b57233bb6cb0ba867f8556c080d61b01a5eb5efb7f1e3d68835e5bd16adc2630c65e1
7
- data.tar.gz: 95b6c47592ba8641b4398859dca9c80b0d644c9e61cffec5482ff5741047daa9523f9cc5efb1974e197f3f06cab07321a5aca8b1838635372b3ea26e37cfca45
6
+ metadata.gz: c41c724dc99aa3fdf49db46eeac0bec822bd6a67989792f4830900da7b74882c27837535a03a2ea6ed0575736fc895b23bb3440613d1f581e877bcbfe1c06934
7
+ data.tar.gz: 482af09f25f72f9fa0261f02e4e224dc58a400519f167f8cb0ea0dda4960b24a41b105731a4fcc2b81ff15f158497b9bf1cc86d55272ed8fe4ca7ed9029bc047
data/Changes.md CHANGED
@@ -2,11 +2,27 @@
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
- HEAD
5
+ 7.0.1
6
6
  ----------
7
7
 
8
- - Adjust CurrentAttributes to work with the String class name so we aren't referencing
9
- the Class within a Rails initializer [#5536]
8
+ - Allow an embedding process to reuse its own heartbeat thread
9
+ - Update zh-cn localization
10
+
11
+ 7.0.0
12
+ ----------
13
+
14
+ - Embedded mode!
15
+ - Capsules!!
16
+ - Job Execution metrics!!!
17
+ - See `docs/7.0-Upgrade.md` for release notes
18
+
19
+ 6.5.8
20
+ ----------
21
+
22
+ - Fail if using a bad version of scout_apm [#5616]
23
+ - Add pagination to Busy page [#5556]
24
+ - Speed up WorkSet#each [#5559]
25
+ - Adjust CurrentAttributes to work with the String class name so we aren't referencing the Class within a Rails initializer [#5536]
10
26
 
11
27
  6.5.7
12
28
  ----------
data/bin/sidekiqload CHANGED
@@ -19,7 +19,7 @@ x = Sidekiq.configure_embed do |config|
19
19
  end
20
20
 
21
21
  class LoadWorker
22
- include Sidekiq::Worker
22
+ include Sidekiq::Job
23
23
  sidekiq_options retry: 1
24
24
  sidekiq_retry_in do |x|
25
25
  1
data/lib/sidekiq/api.rb CHANGED
@@ -1034,24 +1034,24 @@ module Sidekiq
1034
1034
 
1035
1035
  def each(&block)
1036
1036
  results = []
1037
+ procs = nil
1038
+ all_works = nil
1039
+
1037
1040
  Sidekiq.redis do |conn|
1038
- procs = conn.sscan("processes").to_a
1039
- procs.sort.each do |key|
1040
- valid, workers = conn.pipelined { |pipeline|
1041
- pipeline.exists(key)
1041
+ procs = conn.sscan("processes").to_a.sort
1042
+ all_works = conn.pipelined do |pipeline|
1043
+ procs.each do |key|
1042
1044
  pipeline.hgetall("#{key}:work")
1043
- }
1044
- next unless valid > 0
1045
- workers.each_pair do |tid, json|
1046
- hsh = Sidekiq.load_json(json)
1047
- p = hsh["payload"]
1048
- # avoid breaking API, this is a side effect of the JSON optimization in #4316
1049
- hsh["payload"] = Sidekiq.load_json(p) if p.is_a?(String)
1050
- results << [key, tid, hsh]
1051
1045
  end
1052
1046
  end
1053
1047
  end
1054
1048
 
1049
+ procs.zip(all_works).each do |key, workers|
1050
+ workers.each_pair do |tid, json|
1051
+ results << [key, tid, Sidekiq.load_json(json)] unless json.empty?
1052
+ end
1053
+ end
1054
+
1055
1055
  results.sort_by { |(_, _, hsh)| hsh["run_at"] }.each(&block)
1056
1056
  end
1057
1057
 
@@ -4,10 +4,10 @@ module Sidekiq
4
4
  # A Sidekiq::Capsule is the set of resources necessary to
5
5
  # process one or more queues with a given concurrency.
6
6
  # One "default" Capsule is started but the user may declare additional
7
- # Capsules in the initializer.
7
+ # Capsules in their initializer.
8
8
  #
9
- # To process a "single" queue with one thread so jobs are processed
10
- # serially, you can do this:
9
+ # This capsule will pull jobs from the "single" queue and process
10
+ # the jobs with one thread, meaning the jobs will be processed serially.
11
11
  #
12
12
  # Sidekiq.configure_server do |config|
13
13
  # config.capsule("single-threaded") do |cap|
@@ -38,7 +38,7 @@ module Sidekiq
38
38
  end
39
39
 
40
40
  def stop
41
- fetcher&.bulk_requeue([], nil)
41
+ fetcher&.bulk_requeue([])
42
42
  end
43
43
 
44
44
  def queues=(val)
data/lib/sidekiq/cli.rb CHANGED
@@ -280,6 +280,13 @@ module Sidekiq # :nodoc:
280
280
  cap.queues = opts[:queues]
281
281
  cap.concurrency = opts[:concurrency] || @config[:concurrency]
282
282
  end
283
+
284
+ opts[:capsules]&.each do |name, cap_config|
285
+ @config.capsule(name.to_s) do |cap|
286
+ cap.queues = cap_config[:queues]
287
+ cap.concurrency = cap_config[:concurrency]
288
+ end
289
+ end
283
290
  end
284
291
 
285
292
  def boot_application
@@ -339,10 +346,6 @@ module Sidekiq # :nodoc:
339
346
  opts[:concurrency] = Integer(arg)
340
347
  end
341
348
 
342
- o.on "-d", "--daemon", "Daemonize process" do |arg|
343
- puts "ERROR: Daemonization mode was removed in Sidekiq 6.0, please use a proper process supervisor to start and manage your services"
344
- end
345
-
346
349
  o.on "-e", "--environment ENV", "Application environment" do |arg|
347
350
  opts[:environment] = arg
348
351
  end
@@ -372,15 +375,7 @@ module Sidekiq # :nodoc:
372
375
  opts[:config_file] = arg
373
376
  end
374
377
 
375
- o.on "-L", "--logfile PATH", "path to writable logfile" do |arg|
376
- puts "ERROR: Logfile redirection was removed in Sidekiq 6.0, Sidekiq will only log to STDOUT"
377
- end
378
-
379
- o.on "-P", "--pidfile PATH", "path to pidfile" do |arg|
380
- puts "ERROR: PID file creation was removed in Sidekiq 6.0, please use a proper process supervisor to start and manage your services"
381
- end
382
-
383
- o.on "-V", "--version", "Print version and exit" do |arg|
378
+ o.on "-V", "--version", "Print version and exit" do
384
379
  puts "Sidekiq #{Sidekiq::VERSION}"
385
380
  die(0)
386
381
  end
@@ -33,7 +33,8 @@ module Sidekiq
33
33
  reloader: proc { |&block| block.call }
34
34
  }
35
35
 
36
- ERROR_HANDLER = ->(ex, ctx, cfg = Sidekiq.default_configuration) {
36
+ ERROR_HANDLER = ->(ex, ctx) {
37
+ cfg = ctx[:_config] || Sidekiq.default_configuration
37
38
  l = cfg.logger
38
39
  l.warn(Sidekiq.dump_json(ctx)) unless ctx.empty?
39
40
  l.warn("#{ex.class.name}: #{ex.message}")
@@ -49,7 +50,6 @@ module Sidekiq
49
50
  end
50
51
 
51
52
  def_delegators :@options, :[], :[]=, :fetch, :key?, :has_key?, :merge!
52
- attr_reader :options
53
53
  attr_reader :capsules
54
54
 
55
55
  # LEGACY: edits the default capsule
@@ -257,8 +257,9 @@ module Sidekiq
257
257
  if @options[:error_handlers].size == 0
258
258
  p ["!!!!!", ex]
259
259
  end
260
+ ctx[:_config] = self
260
261
  @options[:error_handlers].each do |handler|
261
- handler.call(ex, ctx, self)
262
+ handler.call(ex, ctx)
262
263
  rescue => e
263
264
  l = logger
264
265
  l.error "!!! ERROR HANDLER THREW AN ERROR !!!"
@@ -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/fetch.rb CHANGED
@@ -50,7 +50,7 @@ module Sidekiq # :nodoc:
50
50
  UnitOfWork.new(queue, job, config) if queue
51
51
  end
52
52
 
53
- def bulk_requeue(inprogress, _)
53
+ def bulk_requeue(inprogress)
54
54
  return if inprogress.empty?
55
55
 
56
56
  logger.debug { "Re-queueing terminated jobs" }
@@ -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
@@ -104,7 +104,7 @@ module Sidekiq
104
104
  # contract says that jobs are run AT LEAST once. Process termination
105
105
  # is delayed until we're certain the jobs are back in Redis because
106
106
  # it is worse to lose a job than to run it twice.
107
- capsule.fetcher.bulk_requeue(jobs, nil)
107
+ capsule.fetcher.bulk_requeue(jobs)
108
108
  end
109
109
 
110
110
  cleanup.each do |processor|
@@ -43,5 +43,13 @@ module Sidekiq
43
43
  end
44
44
  end
45
45
  end
46
+
47
+ def page_items(items, pageidx = 1, page_size = 25)
48
+ current_page = pageidx.to_i < 1 ? 1 : pageidx.to_i
49
+ pageidx = current_page - 1
50
+ starting = pageidx * page_size
51
+ items = items.to_a
52
+ [current_page, items.size, items[starting, page_size]]
53
+ end
46
54
  end
47
55
  end
data/lib/sidekiq/rails.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "sidekiq/job"
4
+ require "rails"
4
5
 
5
6
  module Sidekiq
6
7
  class Rails < ::Rails::Engine
@@ -22,7 +23,7 @@ module Sidekiq
22
23
 
23
24
  # By including the Options module, we allow AJs to directly control sidekiq features
24
25
  # via the *sidekiq_options* class method and, for instance, not use AJ's retry system.
25
- # AJ retries don't show up in the Sidekiq UI Retries tab, save any error data, can't be
26
+ # AJ retries don't show up in the Sidekiq UI Retries tab, don't save any error data, can't be
26
27
  # manually retried, don't automatically die, etc.
27
28
  #
28
29
  # class SomeJob < ActiveJob::Base
@@ -48,13 +49,6 @@ module Sidekiq
48
49
  end
49
50
  end
50
51
 
51
- config.before_configuration do
52
- dep = ActiveSupport::Deprecation.new("7.0", "Sidekiq")
53
- dep.deprecate_methods(Sidekiq.singleton_class,
54
- default_worker_options: :default_job_options,
55
- "default_worker_options=": :default_job_options=)
56
- end
57
-
58
52
  # This hook happens after all initializers are run, just before returning
59
53
  # from config/environment.rb back to sidekiq/cli.rb.
60
54
  #
@@ -211,7 +211,7 @@ module Sidekiq
211
211
  #
212
212
  # You can also clear and drain all job types:
213
213
  #
214
- # Sidekiq::Worker.clear_all # or .drain_all
214
+ # Sidekiq::Job.clear_all # or .drain_all
215
215
  #
216
216
  # This can be useful to make sure jobs don't linger between tests:
217
217
  #
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sidekiq
4
- VERSION = "7.0.0.beta1"
4
+ VERSION = "7.0.1"
5
+ MAJOR = 7
5
6
  end
@@ -74,6 +74,9 @@ module Sidekiq
74
74
  end
75
75
 
76
76
  get "/busy" do
77
+ @count = (params["count"] || 100).to_i
78
+ (@current_page, @total_size, @workset) = page_items(workset, params["page"], @count)
79
+
77
80
  erb(:busy)
78
81
  end
79
82
 
@@ -148,25 +148,15 @@ module Sidekiq
148
148
  @processes ||= Sidekiq::ProcessSet.new
149
149
  end
150
150
 
151
- # Sorts processes by hostname following the natural sort order so that
152
- # 'worker.1' < 'worker.2' < 'worker.10' < 'worker.20'
153
- # '2.1.1.1' < '192.168.0.2' < '192.168.0.10'
151
+ # Sorts processes by hostname following the natural sort order
154
152
  def sorted_processes
155
153
  @sorted_processes ||= begin
156
154
  return processes unless processes.all? { |p| p["hostname"] }
157
155
 
158
- split_characters = /[._-]+/
159
-
160
- padding = processes.flat_map { |p| p["hostname"].split(split_characters) }.map(&:size).max
161
-
162
156
  processes.to_a.sort_by do |process|
163
- process["hostname"].split(split_characters).map do |substring|
164
- # Left-pad the substring with '0' if it starts with a number or 'a'
165
- # otherwise, so that '25' < 192' < 'a' ('025' < '192' < 'aaa')
166
- padding_char = substring[0].match?(/\d/) ? "0" : "a"
167
-
168
- substring.rjust(padding, padding_char)
169
- end
157
+ # Kudos to `shurikk` on StackOverflow
158
+ # https://stackoverflow.com/a/15170063/575547
159
+ process["hostname"].split(/(\d+)/).map { |a| /\d+/.match?(a) ? a.to_i : a }
170
160
  end
171
161
  end
172
162
  end
@@ -333,6 +323,10 @@ module Sidekiq
333
323
  Time.now.utc.strftime("%H:%M:%S UTC")
334
324
  end
335
325
 
326
+ def pollable?
327
+ !(current_path == "" || current_path.starts_with?("metrics"))
328
+ end
329
+
336
330
  def retry_or_delete_or_kill(job, params)
337
331
  if params["retry"]
338
332
  job.retry
@@ -1,4 +1,4 @@
1
- require "sidekiq/job"
1
+ # frozen_string_literal: true
2
2
 
3
3
  module Sidekiq
4
4
  # Sidekiq::Job is a new alias for Sidekiq::Worker as of Sidekiq 6.3.0.
data/lib/sidekiq.rb CHANGED
@@ -3,6 +3,30 @@
3
3
  require "sidekiq/version"
4
4
  fail "Sidekiq #{Sidekiq::VERSION} does not support Ruby versions below 2.7.0." if RUBY_PLATFORM != "java" && Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.7.0")
5
5
 
6
+ begin
7
+ require "sidekiq-ent/version"
8
+ fail <<~EOM if Gem::Version.new(Sidekiq::Enterprise::VERSION).segments[0] != Sidekiq::MAJOR
9
+
10
+ Sidekiq Enterprise #{Sidekiq::Enterprise::VERSION} does not work with Sidekiq #{Sidekiq::VERSION}.
11
+ Starting with Sidekiq 7, major versions are synchronized so Sidekiq Enterprise 7 works with Sidekiq 7.
12
+ Use `bundle up sidekiq-ent` to upgrade.
13
+
14
+ EOM
15
+ rescue LoadError
16
+ end
17
+
18
+ begin
19
+ require "sidekiq/pro/version"
20
+ fail <<~EOM if Gem::Version.new(Sidekiq::Pro::VERSION).segments[0] != Sidekiq::MAJOR
21
+
22
+ Sidekiq Pro #{Sidekiq::Pro::VERSION} does not work with Sidekiq #{Sidekiq::VERSION}.
23
+ Starting with Sidekiq 7, major versions are synchronized so Sidekiq Pro 7 works with Sidekiq 7.
24
+ Use `bundle up sidekiq-pro` to upgrade.
25
+
26
+ EOM
27
+ rescue LoadError
28
+ end
29
+
6
30
  require "sidekiq/config"
7
31
  require "sidekiq/logger"
8
32
  require "sidekiq/client"
@@ -80,7 +104,7 @@ module Sidekiq
80
104
  end
81
105
 
82
106
  # Creates a Sidekiq::Config instance that is more tuned for embedding
83
- # within an arbitrary Ruby process. Noteably it reduces concurrency by
107
+ # within an arbitrary Ruby process. Notably it reduces concurrency by
84
108
  # default so there is less contention for CPU time with other threads.
85
109
  #
86
110
  # inst = Sidekiq.configure_embed do |config|
data/sidekiq.gemspec CHANGED
@@ -41,10 +41,8 @@ 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.
47
- 2. Read the release notes at https://github.com/mperham/sidekiq/blob/7-0/docs/7.0-Upgrade.md
44
+ 1. Use `gem 'sidekiq', '<7'` in your Gemfile if you don't want this new version.
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
 
50
48
  ####################################################
@@ -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: 失败
@@ -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
@@ -96,6 +96,11 @@
96
96
  <div class="col-sm-7">
97
97
  <h3><%= t('Jobs') %></h3>
98
98
  </div>
99
+ <% if @workset.size > 0 && @total_size > @count %>
100
+ <div class="col-sm-4">
101
+ <%= erb :_paging, locals: { url: "#{root_path}busy" } %>
102
+ </div>
103
+ <% end %>
99
104
  </div>
100
105
 
101
106
  <div class="table_container">
@@ -109,7 +114,7 @@
109
114
  <th><%= t('Arguments') %></th>
110
115
  <th><%= t('Started') %></th>
111
116
  </thead>
112
- <% workset.each do |process, thread, msg| %>
117
+ <% @workset.each do |process, thread, msg| %>
113
118
  <% job = Sidekiq::JobRecord.new(msg['payload']) %>
114
119
  <tr>
115
120
  <td><%= process %></td>
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.beta1
4
+ version: 7.0.1
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-09-26 00:00:00.000000000 Z
11
+ date: 2022-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis-client
@@ -111,7 +111,6 @@ files:
111
111
  - lib/sidekiq/middleware/modules.rb
112
112
  - lib/sidekiq/monitor.rb
113
113
  - lib/sidekiq/paginator.rb
114
- - lib/sidekiq/pool.rb
115
114
  - lib/sidekiq/processor.rb
116
115
  - lib/sidekiq/rails.rb
117
116
  - lib/sidekiq/redis_client_adapter.rb
@@ -220,10 +219,8 @@ post_install_message: |2
220
219
  ░░░░░░░░░ ░░░░░ ░░░░░░░░░░ ░░░░░░░░░░ ░░░░░ ░░░░ ░░░░░ ░░░░░░ ░░ ░░░ ░░ ░░░░░░
221
220
 
222
221
 
223
- WARNING: This is a beta release, expect breakage!
224
-
225
- 1. Use `gem 'sidekiq', '<7'` in your Gemfile if you don't want to be a beta tester.
226
- 2. Read the release notes at https://github.com/mperham/sidekiq/blob/7-0/docs/7.0-Upgrade.md
222
+ 1. Use `gem 'sidekiq', '<7'` in your Gemfile if you don't want this new version.
223
+ 2. Read the release notes at https://github.com/mperham/sidekiq/blob/main/docs/7.0-Upgrade.md
227
224
  3. Search for open/closed issues at https://github.com/mperham/sidekiq/issues/
228
225
 
229
226
  ####################################################
@@ -237,9 +234,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
237
234
  version: 2.7.0
238
235
  required_rubygems_version: !ruby/object:Gem::Requirement
239
236
  requirements:
240
- - - ">"
237
+ - - ">="
241
238
  - !ruby/object:Gem::Version
242
- version: 1.3.1
239
+ version: '0'
243
240
  requirements: []
244
241
  rubygems_version: 3.2.32
245
242
  signing_key:
data/lib/sidekiq/pool.rb DELETED
@@ -1,7 +0,0 @@
1
- module Sidekiq
2
- module PoolAccess
3
- def redis_pool
4
- Thread.current[:sidekiq_redis_pool] || (@redis ||= Sidekiq::RedisConnection.create)
5
- end
6
- end
7
- end