sidekiq 7.0.0 → 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: 9c6762c97172b3f8e4b7cc1fd940756ee8796faf70ece8d5e9ede9e2dc7797fe
4
- data.tar.gz: 905e0e1f381e1c40832ab2137589161fcccfb63c847ad36c9cca15765d952659
3
+ metadata.gz: 98aab60f0a9bd14122cf62b2f31c17e41b67feb8c9fb13865ef0a16002d38ed7
4
+ data.tar.gz: 94038f0176ccb7785c6112cd41e915e4a1c7f66298a9670457a68e6b62f2710c
5
5
  SHA512:
6
- metadata.gz: acfc9bb74585cc65ad1af27e263668ec154ac791baa99de2a1542cfe462a7b13544a758a7bd574d623088c9e683f705437cc4e4495f05e57770037d030214a44
7
- data.tar.gz: 31320e6cd2fab0d253f3a32616f51360c4ad6a9ef30acef5f88a6ccc6eaf75e04b76ea12dd053dd29442d96fa49234f65e14801e7600cf0f300c023d75aecf43
6
+ metadata.gz: c41c724dc99aa3fdf49db46eeac0bec822bd6a67989792f4830900da7b74882c27837535a03a2ea6ed0575736fc895b23bb3440613d1f581e877bcbfe1c06934
7
+ data.tar.gz: 482af09f25f72f9fa0261f02e4e224dc58a400519f167f8cb0ea0dda4960b24a41b105731a4fcc2b81ff15f158497b9bf1cc86d55272ed8fe4ca7ed9029bc047
data/Changes.md CHANGED
@@ -2,7 +2,13 @@
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.1
6
+ ----------
7
+
8
+ - Allow an embedding process to reuse its own heartbeat thread
9
+ - Update zh-cn localization
10
+
11
+ 7.0.0
6
12
  ----------
7
13
 
8
14
  - Embedded mode!
@@ -10,13 +16,13 @@ main
10
16
  - Job Execution metrics!!!
11
17
  - See `docs/7.0-Upgrade.md` for release notes
12
18
 
13
- 6-x
19
+ 6.5.8
14
20
  ----------
15
21
 
22
+ - Fail if using a bad version of scout_apm [#5616]
16
23
  - Add pagination to Busy page [#5556]
17
24
  - 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]
25
+ - Adjust CurrentAttributes to work with the String class name so we aren't referencing the Class within a Rails initializer [#5536]
20
26
 
21
27
  6.5.7
22
28
  ----------
@@ -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
 
@@ -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
@@ -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.1"
5
5
  MAJOR = 7
6
6
  end
@@ -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.starts_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/sidekiq.gemspec CHANGED
@@ -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
 
@@ -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 %>
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.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-10-27 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
@@ -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