sidekiq 6.5.12 → 7.0.6
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 +4 -4
- data/Changes.md +63 -22
- data/README.md +40 -32
- data/bin/sidekiq +3 -8
- data/bin/sidekiqload +186 -118
- data/bin/sidekiqmon +3 -0
- data/lib/sidekiq/api.rb +84 -121
- data/lib/sidekiq/capsule.rb +127 -0
- data/lib/sidekiq/cli.rb +55 -74
- data/lib/sidekiq/client.rb +29 -16
- data/lib/sidekiq/component.rb +3 -0
- data/lib/sidekiq/config.rb +270 -0
- data/lib/sidekiq/deploy.rb +62 -0
- data/lib/sidekiq/embedded.rb +61 -0
- data/lib/sidekiq/fetch.rb +11 -14
- data/lib/sidekiq/job.rb +375 -10
- data/lib/sidekiq/job_logger.rb +2 -2
- data/lib/sidekiq/job_retry.rb +9 -9
- data/lib/sidekiq/job_util.rb +48 -14
- data/lib/sidekiq/launcher.rb +64 -61
- data/lib/sidekiq/logger.rb +1 -26
- data/lib/sidekiq/manager.rb +9 -11
- data/lib/sidekiq/metrics/query.rb +2 -2
- data/lib/sidekiq/metrics/shared.rb +4 -3
- data/lib/sidekiq/metrics/tracking.rb +20 -18
- data/lib/sidekiq/middleware/chain.rb +19 -18
- data/lib/sidekiq/middleware/current_attributes.rb +8 -15
- data/lib/sidekiq/monitor.rb +16 -3
- data/lib/sidekiq/processor.rb +21 -27
- data/lib/sidekiq/rails.rb +13 -17
- data/lib/sidekiq/redis_client_adapter.rb +8 -47
- data/lib/sidekiq/redis_connection.rb +11 -111
- data/lib/sidekiq/scheduled.rb +20 -21
- data/lib/sidekiq/testing.rb +5 -33
- data/lib/sidekiq/transaction_aware_client.rb +4 -5
- data/lib/sidekiq/version.rb +2 -1
- data/lib/sidekiq/web/application.rb +21 -6
- data/lib/sidekiq/web/csrf_protection.rb +1 -1
- data/lib/sidekiq/web/helpers.rb +16 -15
- data/lib/sidekiq/web.rb +6 -17
- data/lib/sidekiq/worker_compatibility_alias.rb +13 -0
- data/lib/sidekiq.rb +76 -274
- data/sidekiq.gemspec +20 -10
- data/web/assets/javascripts/application.js +18 -1
- data/web/assets/javascripts/base-charts.js +106 -0
- data/web/assets/javascripts/dashboard-charts.js +166 -0
- data/web/assets/javascripts/dashboard.js +3 -223
- data/web/assets/javascripts/metrics.js +117 -115
- data/web/assets/stylesheets/application-dark.css +4 -0
- data/web/assets/stylesheets/application-rtl.css +2 -91
- data/web/assets/stylesheets/application.css +23 -298
- data/web/locales/ar.yml +70 -70
- data/web/locales/cs.yml +62 -62
- data/web/locales/da.yml +60 -53
- data/web/locales/de.yml +65 -65
- data/web/locales/el.yml +2 -7
- data/web/locales/en.yml +76 -70
- data/web/locales/es.yml +68 -68
- data/web/locales/fa.yml +65 -65
- data/web/locales/fr.yml +67 -67
- data/web/locales/he.yml +65 -64
- data/web/locales/hi.yml +59 -59
- data/web/locales/it.yml +53 -53
- data/web/locales/ja.yml +64 -68
- data/web/locales/ko.yml +52 -52
- data/web/locales/lt.yml +66 -66
- data/web/locales/nb.yml +61 -61
- data/web/locales/nl.yml +52 -52
- data/web/locales/pl.yml +45 -45
- data/web/locales/pt-br.yml +59 -69
- data/web/locales/pt.yml +51 -51
- data/web/locales/ru.yml +67 -66
- data/web/locales/sv.yml +53 -53
- data/web/locales/ta.yml +60 -60
- data/web/locales/uk.yml +62 -61
- data/web/locales/ur.yml +64 -64
- data/web/locales/vi.yml +67 -67
- data/web/locales/zh-cn.yml +20 -18
- data/web/locales/zh-tw.yml +10 -1
- data/web/views/_footer.erb +5 -2
- data/web/views/_job_info.erb +18 -2
- data/web/views/_metrics_period_select.erb +12 -0
- data/web/views/_paging.erb +2 -0
- data/web/views/_poll_link.erb +1 -1
- data/web/views/busy.erb +37 -26
- data/web/views/dashboard.erb +36 -5
- data/web/views/metrics.erb +33 -20
- data/web/views/metrics_for_job.erb +22 -38
- data/web/views/morgue.erb +5 -9
- data/web/views/queue.erb +10 -14
- data/web/views/queues.erb +3 -1
- data/web/views/retries.erb +5 -9
- data/web/views/scheduled.erb +12 -13
- metadata +50 -40
- data/lib/sidekiq/delay.rb +0 -43
- data/lib/sidekiq/extensions/action_mailer.rb +0 -48
- data/lib/sidekiq/extensions/active_record.rb +0 -43
- data/lib/sidekiq/extensions/class_methods.rb +0 -43
- data/lib/sidekiq/extensions/generic_proxy.rb +0 -33
- data/lib/sidekiq/metrics/deploy.rb +0 -47
- data/lib/sidekiq/worker.rb +0 -370
- data/web/assets/javascripts/graph.js +0 -16
- /data/{LICENSE → LICENSE.txt} +0 -0
data/web/locales/vi.yml
CHANGED
@@ -1,83 +1,83 @@
|
|
1
1
|
# elements like %{queue} are variables and should not be translated
|
2
|
-
vi:
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
2
|
+
vi:
|
3
|
+
Actions: Những hành động
|
4
|
+
AddToQueue: Thêm vào hàng đợi
|
5
|
+
AreYouSure: Bạn chắc chứ?
|
6
|
+
AreYouSureDeleteJob: Bạn có chắc là muốn xóa tác vụ này?
|
7
|
+
AreYouSureDeleteQueue: Bạn có chắc là muốn xóa %{queue} này?
|
8
|
+
Arguments: Tham số
|
9
|
+
BackToApp: Trở về ứng dụng
|
9
10
|
Busy: Bận rộn
|
10
|
-
Processed: Đã xử lí
|
11
|
-
Failed: Đã thất bại
|
12
|
-
Scheduled: Đã lên lịch
|
13
|
-
Retries: Số lần thử
|
14
|
-
Enqueued: Đã xếp hàng đợi
|
15
|
-
Worker: Máy xử lí
|
16
|
-
LivePoll: Thăm dò trực tiếp
|
17
|
-
StopPolling: Ngừng thăm dò
|
18
|
-
Queue: Hàng đợi
|
19
11
|
Class: Lớp
|
20
|
-
|
21
|
-
|
22
|
-
Extras: Thêm
|
23
|
-
Started: Đã bắt đầu
|
24
|
-
ShowAll: Hiện tất cả
|
12
|
+
Connections: Các kết nối
|
13
|
+
CreatedAt: Được tạo vào lúc
|
25
14
|
CurrentMessagesInQueue: Số lượng công việc trong <span class='title'>%{queue}</span>
|
15
|
+
Dashboard: Bảng điều khiển
|
16
|
+
Dead: Chết
|
17
|
+
DeadJobs: Những tác vụ đã chết
|
26
18
|
Delete: Xóa
|
27
|
-
AddToQueue: Thêm vào hàng đợi
|
28
|
-
AreYouSureDeleteJob: Bạn có chắc là muốn xóa tác vụ này?
|
29
|
-
AreYouSureDeleteQueue: Bạn có chắc là muốn xóa %{queue} này?
|
30
|
-
Queues: Các hàng đợi
|
31
|
-
Size: Kích thước
|
32
|
-
Actions: Những hành động
|
33
|
-
NextRetry: Lần thử lại tiếp theo
|
34
|
-
RetryCount: Số lần thử lại
|
35
|
-
RetryNow: Thử lại ngay bây giờ
|
36
|
-
Kill: Giết
|
37
|
-
LastRetry: Lần thử cuối
|
38
|
-
OriginallyFailed: Đã thất bại từ đầu
|
39
|
-
AreYouSure: Bạn chắc chứ?
|
40
19
|
DeleteAll: Xóa hết
|
41
|
-
|
42
|
-
KillAll: Giết hết
|
43
|
-
NoRetriesFound: Không có lần thử nào được tìm thấy
|
20
|
+
Enqueued: Đã xếp hàng đợi
|
44
21
|
Error: Lỗi
|
22
|
+
ErrorBacktrace: Dấu vết của lỗi
|
45
23
|
ErrorClass: Lớp lỗi
|
46
24
|
ErrorMessage: Tin nhắn lỗi
|
47
|
-
|
25
|
+
Extras: Thêm
|
26
|
+
Failed: Đã thất bại
|
27
|
+
Failures: Các thất bại
|
48
28
|
GoBack: ← Trở lại
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
29
|
+
History: Lịch sử
|
30
|
+
Job: Tác vụ
|
31
|
+
Jobs: Các tác vụ
|
32
|
+
Kill: Giết
|
33
|
+
KillAll: Giết hết
|
34
|
+
LastRetry: Lần thử cuối
|
35
|
+
Latency: Độ trễ
|
36
|
+
LivePoll: Thăm dò trực tiếp
|
56
37
|
MemoryUsage: Lượng bộ nhớ sử dụng
|
57
|
-
|
58
|
-
|
59
|
-
OneWeek: 1 tuần
|
60
|
-
OneMonth: 1 tháng
|
61
|
-
ThreeMonths: 3 tháng
|
62
|
-
SixMonths: 6 tháng
|
63
|
-
Failures: Các thất bại
|
64
|
-
DeadJobs: Những tác vụ đã chết
|
38
|
+
Namespace: Không gian tên
|
39
|
+
NextRetry: Lần thử lại tiếp theo
|
65
40
|
NoDeadJobsFound: Không có tác vụ đã chết nào được tìm thấy
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
41
|
+
NoRetriesFound: Không có lần thử nào được tìm thấy
|
42
|
+
NoScheduledFound: Không có tác vụ đã lên lịch nào được tìm thấy
|
43
|
+
NotYetEnqueued: Chưa được bỏ vào hàng đợi
|
44
|
+
OneMonth: 1 tháng
|
45
|
+
OneWeek: 1 tuần
|
46
|
+
OriginallyFailed: Đã thất bại từ đầu
|
47
|
+
Pause: Tạm dừng
|
71
48
|
Paused: Đã tạm dừng
|
72
|
-
|
49
|
+
PeakMemoryUsage: Lượng bộ nhớ sử dụng đỉnh điểm
|
50
|
+
Plugins: Hệ thống đính kèm
|
51
|
+
PollingInterval: Khoảng thời gian giữa các lần thăm dò
|
52
|
+
Processed: Đã xử lí
|
53
|
+
Processes: Tiến trình xử lí
|
54
|
+
Queue: Hàng đợi
|
55
|
+
Queues: Các hàng đợi
|
73
56
|
Quiet: Im lặng
|
74
|
-
StopAll: Dừng lại tất cả
|
75
57
|
QuietAll: Làm cho tất cả im lặng
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
58
|
+
Realtime: Thời gian thực
|
59
|
+
Retries: Số lần thử
|
60
|
+
RetryAll: Thử lại tất cả
|
61
|
+
RetryCount: Số lần thử lại
|
62
|
+
RetryNow: Thử lại ngay bây giờ
|
63
|
+
Scheduled: Đã lên lịch
|
64
|
+
ScheduledJobs: Những Tác Vụ Được Hẹn
|
65
|
+
ShowAll: Hiện tất cả
|
66
|
+
SixMonths: 6 tháng
|
67
|
+
Size: Kích thước
|
68
|
+
Started: Đã bắt đầu
|
69
|
+
Status: Trạng thái
|
70
|
+
Stop: Dừng Lại
|
71
|
+
StopAll: Dừng lại tất cả
|
72
|
+
StopPolling: Ngừng thăm dò
|
73
|
+
Thread: Luồng xử lí
|
74
|
+
Threads: Những luồng xử lí
|
75
|
+
ThreeMonths: 3 tháng
|
76
|
+
Time: Thời gian
|
83
77
|
Unpause: Hủy tạm dừng
|
78
|
+
Uptime: Thời gian hệ thống đã online (days)
|
79
|
+
Version: Phiên bản
|
80
|
+
When: Khi nào
|
81
|
+
Worker: Máy xử lí
|
82
|
+
active: Đang hoạt động
|
83
|
+
idle: Đang chờ
|
data/web/locales/zh-cn.yml
CHANGED
@@ -32,22 +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
46
|
ErrorClass: 错误类别
|
47
47
|
ErrorMessage: 错误消息
|
48
48
|
ErrorBacktrace: 错误细节
|
49
49
|
GoBack: ← 返回
|
50
|
-
NoScheduledFound:
|
50
|
+
NoScheduledFound: 没有发现计划任务
|
51
51
|
When: 当
|
52
52
|
ScheduledJobs: 计划任务
|
53
53
|
idle: 闲置
|
@@ -63,26 +63,26 @@ zh-cn: # <---- change this to your locale code
|
|
63
63
|
SixMonths: 六个月
|
64
64
|
Failures: 失败
|
65
65
|
DeadJobs: 已停滞任务
|
66
|
-
NoDeadJobsFound:
|
66
|
+
NoDeadJobsFound: 没有发现任何已停滞的任务
|
67
67
|
Dead: 已停滞
|
68
68
|
Process: 进程
|
69
|
-
Processes:
|
69
|
+
Processes: 进程
|
70
70
|
Name: 名称
|
71
71
|
Thread: 线程
|
72
72
|
Threads: 线程
|
73
73
|
Jobs: 任务
|
74
|
-
Paused:
|
75
|
-
Stop:
|
76
|
-
Quiet:
|
77
|
-
StopAll:
|
78
|
-
QuietAll:
|
79
|
-
PollingInterval:
|
80
|
-
Plugins:
|
81
|
-
NotYetEnqueued:
|
82
|
-
CreatedAt:
|
74
|
+
Paused: 已暂停
|
75
|
+
Stop: 强制暂停
|
76
|
+
Quiet: 暂停
|
77
|
+
StopAll: 全部强制暂停
|
78
|
+
QuietAll: 全部暂停
|
79
|
+
PollingInterval: 轮询周期
|
80
|
+
Plugins: 插件
|
81
|
+
NotYetEnqueued: 尚未进入队列
|
82
|
+
CreatedAt: 建立时间
|
83
83
|
BackToApp: 回首頁
|
84
|
-
Latency:
|
85
|
-
Pause:
|
84
|
+
Latency: 延迟
|
85
|
+
Pause: 暂停
|
86
86
|
Unpause: 取消暂停
|
87
87
|
Metrics: 指标
|
88
88
|
NoDataFound: 无数据
|
@@ -91,3 +91,5 @@ zh-cn: # <---- change this to your locale code
|
|
91
91
|
Context: 上下文
|
92
92
|
Bucket: 桶
|
93
93
|
NoJobMetricsFound: 无任务相关指标数据
|
94
|
+
Success: 成功
|
95
|
+
Failure: 失败
|
data/web/locales/zh-tw.yml
CHANGED
@@ -43,6 +43,7 @@ zh-tw: # <---- change this to your locale code
|
|
43
43
|
KillAll: 全部取消
|
44
44
|
NoRetriesFound: 找無可重試的工作
|
45
45
|
Error: 錯誤
|
46
|
+
ErrorBacktrace: 錯誤的回調追踨
|
46
47
|
ErrorClass: 錯誤類別
|
47
48
|
ErrorMessage: 錯誤訊息
|
48
49
|
ErrorBacktrace: 詳細錯誤訊息
|
@@ -62,7 +63,15 @@ zh-tw: # <---- change this to your locale code
|
|
62
63
|
ThreeMonths: 三個月
|
63
64
|
SixMonths: 六個月
|
64
65
|
Failures: 失敗
|
65
|
-
|
66
|
+
GoBack: ← 返回
|
67
|
+
History: 歷史資料
|
68
|
+
Job: 工作
|
69
|
+
Jobs: 工作
|
70
|
+
LastRetry: 最後一次重試
|
71
|
+
LivePoll: 即時輪詢
|
72
|
+
MemoryUsage: 記憶體使用量
|
73
|
+
Namespace: 命名空間
|
74
|
+
NextRetry: 下次重試
|
66
75
|
NoDeadJobsFound: 沒有發現任何停滯的工作
|
67
76
|
Dead: 停滯
|
68
77
|
Process: 程序
|
data/web/views/_footer.erb
CHANGED
@@ -6,13 +6,16 @@
|
|
6
6
|
<p class="navbar-text product-version"><%= product_version %></p>
|
7
7
|
</li>
|
8
8
|
<li>
|
9
|
-
<p class="navbar-text redis-url" title="<%=
|
9
|
+
<p class="navbar-text redis-url" title="<%= redis_url %>"><%= redis_url %></p>
|
10
10
|
</li>
|
11
11
|
<li>
|
12
12
|
<p id="serverUtcTime" class="navbar-text server-utc-time"><%= server_utc_time %></p>
|
13
13
|
</li>
|
14
14
|
<li>
|
15
|
-
<p class="navbar-text"><a
|
15
|
+
<p class="navbar-text"><a rel=help href="https://github.com/sidekiq/sidekiq/wiki">docs</a></p>
|
16
|
+
</li>
|
17
|
+
<li>
|
18
|
+
<p class="navbar-text"><a rel=external href="https://github.com/sidekiq/sidekiq/tree/main/web/locales"><%= locale %></a></p>
|
16
19
|
</li>
|
17
20
|
</ul>
|
18
21
|
</div>
|
data/web/views/_job_info.erb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
<header>
|
1
|
+
<div class="header-container">
|
2
2
|
<h3><%= t('Job') %></h3>
|
3
|
-
</
|
3
|
+
</div>
|
4
4
|
|
5
5
|
<div class="table_container">
|
6
6
|
<table class="table table-bordered table-striped table-hover">
|
@@ -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>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<div>
|
2
|
+
<select class="form-control" onchange="window.location.href = '<%= path %>?period=' + event.target.value">
|
3
|
+
<% periods.each_key do |code| %>
|
4
|
+
|
5
|
+
<% if code == period %>
|
6
|
+
<option selected value="<%= code %>"><%= code %></option>
|
7
|
+
<% else %>
|
8
|
+
<option value="<%= code %>"><%= code %></option>
|
9
|
+
<% end %>
|
10
|
+
<% end %>
|
11
|
+
</select>
|
12
|
+
</div>
|
data/web/views/_paging.erb
CHANGED
data/web/views/_poll_link.erb
CHANGED
data/web/views/busy.erb
CHANGED
@@ -1,7 +1,5 @@
|
|
1
|
-
<div class="
|
2
|
-
<
|
3
|
-
<h3><%= t('Status') %></h3>
|
4
|
-
</div>
|
1
|
+
<div class="header-container">
|
2
|
+
<h1><%= t('Status') %></h1>
|
5
3
|
</div>
|
6
4
|
|
7
5
|
<div class="stats-wrapper">
|
@@ -29,11 +27,9 @@
|
|
29
27
|
</div>
|
30
28
|
</div>
|
31
29
|
|
32
|
-
<div class="
|
33
|
-
<
|
34
|
-
|
35
|
-
</div>
|
36
|
-
<div class="col-sm-3 pull-right flip">
|
30
|
+
<div class="header-container">
|
31
|
+
<h1><%= t('Processes') %></h1>
|
32
|
+
<div>
|
37
33
|
<form method="POST" class="warning-messages">
|
38
34
|
<%= csrf_tag %>
|
39
35
|
<div class="btn-group pull-right flip">
|
@@ -43,12 +39,13 @@
|
|
43
39
|
</form>
|
44
40
|
</div>
|
45
41
|
</div>
|
42
|
+
|
46
43
|
<div class="table_container">
|
47
44
|
<table class="processes table table-hover table-bordered table-striped">
|
48
45
|
<thead>
|
49
46
|
<th><%= t('Name') %></th>
|
50
47
|
<th><%= t('Started') %></th>
|
51
|
-
<th class="col-sm-1"><%= t('RSS') %><a target="blank" href="https://github.com/
|
48
|
+
<th class="col-sm-1"><%= t('RSS') %><a target="blank" href="https://github.com/sidekiq/sidekiq/wiki/Memory#rss"><span class="info-circle" title="Click to learn more about RSS">?</span></a></th>
|
52
49
|
<th class="col-sm-1"><%= t('Threads') %></th>
|
53
50
|
<th class="col-sm-1"><%= t('Busy') %></th>
|
54
51
|
<th> </th>
|
@@ -62,6 +59,9 @@
|
|
62
59
|
<% process.labels.each do |label| %>
|
63
60
|
<span class="label label-info"><%= label %></span>
|
64
61
|
<% end %>
|
62
|
+
<% if process.embedded? %>
|
63
|
+
<span class="label label-default">embedded</span>
|
64
|
+
<% end %>
|
65
65
|
<% if process.stopping? %>
|
66
66
|
<span class="label label-danger">quiet</span>
|
67
67
|
<% end %>
|
@@ -70,36 +70,47 @@
|
|
70
70
|
<% end %>
|
71
71
|
<br>
|
72
72
|
<b><%= "#{t('Queues')}: " %></b>
|
73
|
-
|
73
|
+
<% if process.weights %>
|
74
|
+
<%= busy_weights(process.weights) %>
|
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>
|
77
90
|
<td><%= process['concurrency'] %></td>
|
78
91
|
<td><%= process['busy'] %></td>
|
79
92
|
<td>
|
80
|
-
|
81
|
-
|
82
|
-
|
93
|
+
<% unless process.embedded? %>
|
94
|
+
<form method="POST">
|
95
|
+
<%= csrf_tag %>
|
96
|
+
<input type="hidden" name="identity" value="<%= process['identity'] %>"/>
|
83
97
|
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
98
|
+
<div class="btn-group pull-right flip">
|
99
|
+
<% unless process.stopping? %><button class="btn btn-xs btn-warn" type="submit" name="quiet" value="1"><%= t('Quiet') %></button><% end %>
|
100
|
+
<button class="btn btn-xs btn-danger" type="submit" name="stop" value="1"><%= t('Stop') %></button>
|
101
|
+
</div>
|
102
|
+
</form>
|
103
|
+
<% end %>
|
89
104
|
</td>
|
90
105
|
</tr>
|
91
106
|
<% end %>
|
92
107
|
</table>
|
93
108
|
</div>
|
94
109
|
|
95
|
-
<div class="
|
96
|
-
<
|
97
|
-
<h3><%= t('Jobs') %></h3>
|
98
|
-
</div>
|
110
|
+
<div class="header-container">
|
111
|
+
<h1><%= t('Jobs') %></h1>
|
99
112
|
<% if @workset.size > 0 && @total_size > @count %>
|
100
|
-
|
101
|
-
<%= erb :_paging, locals: { url: "#{root_path}busy" } %>
|
102
|
-
</div>
|
113
|
+
<%= erb :_paging, locals: { url: "#{root_path}busy" } %>
|
103
114
|
<% end %>
|
104
115
|
</div>
|
105
116
|
|
data/web/views/dashboard.erb
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
<script type="text/javascript" src="<%= root_path %>javascripts/
|
1
|
+
<script type="text/javascript" src="<%= root_path %>javascripts/chart.min.js"></script>
|
2
|
+
<script type="text/javascript" src="<%= root_path %>javascripts/chartjs-plugin-annotation.min.js"></script>
|
3
|
+
<script type="text/javascript" src="<%= root_path %>javascripts/base-charts.js"></script>
|
4
|
+
<script type="text/javascript" src="<%= root_path %>javascripts/dashboard-charts.js"></script>
|
2
5
|
<script type="text/javascript" src="<%= root_path %>javascripts/dashboard.js"></script>
|
3
6
|
<div class= "dashboard clearfix">
|
4
7
|
<h3 >
|
@@ -17,8 +20,26 @@
|
|
17
20
|
</div>
|
18
21
|
|
19
22
|
<div class="row chart">
|
20
|
-
<
|
21
|
-
<
|
23
|
+
<canvas id="realtime-chart"></canvas>
|
24
|
+
<script>
|
25
|
+
window.realtimeChart = new RealtimeChart(
|
26
|
+
document.getElementById("realtime-chart"),
|
27
|
+
<%= Sidekiq.dump_json({
|
28
|
+
processedLabel: t('Processed'),
|
29
|
+
failedLabel: t('Failed'),
|
30
|
+
labels: Array.new(50, ""),
|
31
|
+
processed: Array.new(50),
|
32
|
+
failed: Array.new(50),
|
33
|
+
updateUrl: "#{root_path}stats",
|
34
|
+
}) %>
|
35
|
+
)
|
36
|
+
</script>
|
37
|
+
|
38
|
+
<!-- start with a space in the legend so the height doesn't change when we add content dynamically -->
|
39
|
+
<div id="realtime-legend"> </div>
|
40
|
+
<script>
|
41
|
+
realtimeChart.registerLegend(document.getElementById("realtime-legend"))
|
42
|
+
</script>
|
22
43
|
</div>
|
23
44
|
|
24
45
|
<div class="row header">
|
@@ -34,8 +55,18 @@
|
|
34
55
|
<a href="<%= root_path %>?days=180" class="history-graph <%= "active" if params[:days] == "180" %>"><%= t('SixMonths') %></a>
|
35
56
|
</div>
|
36
57
|
|
37
|
-
<
|
38
|
-
<
|
58
|
+
<canvas id="history-chart"></canvas>
|
59
|
+
<script>
|
60
|
+
window.historyChart = new DashboardChart(
|
61
|
+
document.getElementById("history-chart"),
|
62
|
+
<%= Sidekiq.dump_json({
|
63
|
+
processedLabel: t('Processed'),
|
64
|
+
failedLabel: t('Failed'),
|
65
|
+
processed: @processed_history.to_a.reverse,
|
66
|
+
failed: @failed_history.to_a.reverse,
|
67
|
+
}) %>
|
68
|
+
)
|
69
|
+
</script>
|
39
70
|
</div>
|
40
71
|
|
41
72
|
<br/>
|
data/web/views/metrics.erb
CHANGED
@@ -1,8 +1,17 @@
|
|
1
1
|
<script type="text/javascript" src="<%= root_path %>javascripts/chart.min.js"></script>
|
2
2
|
<script type="text/javascript" src="<%= root_path %>javascripts/chartjs-plugin-annotation.min.js"></script>
|
3
|
+
<script type="text/javascript" src="<%= root_path %>javascripts/base-charts.js"></script>
|
3
4
|
<script type="text/javascript" src="<%= root_path %>javascripts/metrics.js"></script>
|
4
5
|
|
5
|
-
<
|
6
|
+
<div class="header-container">
|
7
|
+
<div class="page-title-container">
|
8
|
+
<h1><%= t('Metrics') %></h1>
|
9
|
+
|
10
|
+
<a target="blank" href="https://github.com/sidekiq/sidekiq/wiki/Metrics"><span class="info-circle" title="Click to learn more about metrics">?</span></a>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<%= erb :_metrics_period_select, locals: { periods: @periods, period: @period, path: "#{root_path}metrics" } %>
|
14
|
+
</div>
|
6
15
|
|
7
16
|
<%
|
8
17
|
table_limit = 20
|
@@ -11,30 +20,33 @@
|
|
11
20
|
visible_kls = job_results.first(chart_limit).map(&:first)
|
12
21
|
%>
|
13
22
|
|
14
|
-
|
15
|
-
|
16
|
-
<script>
|
17
|
-
window.jobMetricsChart = new JobMetricsOverviewChart(
|
18
|
-
"job-metrics-overview-chart",
|
19
|
-
<%= Sidekiq.dump_json({
|
20
|
-
series: job_results.map { |(kls, jr)| [kls, jr.dig("series", "s")] }.to_h,
|
21
|
-
marks: @query_result.marks.map { |m| [m.bucket, m.label] },
|
22
|
-
visible: visible_kls,
|
23
|
-
labels: @query_result.buckets,
|
24
|
-
}) %>
|
25
|
-
)
|
26
|
-
</script>
|
23
|
+
<% if job_results.any? %>
|
24
|
+
<canvas id="job-metrics-overview-chart"></canvas>
|
27
25
|
|
28
|
-
<
|
26
|
+
<script>
|
27
|
+
window.jobMetricsChart = new JobMetricsOverviewChart(
|
28
|
+
document.getElementById("job-metrics-overview-chart"),
|
29
|
+
<%= Sidekiq.dump_json({
|
30
|
+
series: job_results.map { |(kls, jr)| [kls, jr.dig("series", "s")] }.to_h,
|
31
|
+
marks: @query_result.marks.map { |m| [m.bucket, m.label] },
|
32
|
+
labels: @query_result.buckets,
|
33
|
+
visibleKls: visible_kls,
|
34
|
+
yLabel: t('TotalExecutionTime'),
|
35
|
+
units: t('Seconds').downcase,
|
36
|
+
markLabel: t('Deploy'),
|
37
|
+
}) %>
|
38
|
+
)
|
39
|
+
</script>
|
40
|
+
<% end %>
|
29
41
|
|
30
42
|
<div class="table_container">
|
31
43
|
<table class="table table-bordered table-striped table-hover">
|
32
44
|
<tbody>
|
33
45
|
<tr>
|
34
46
|
<th><%= t('Name') %></th>
|
35
|
-
<th><%= t('
|
36
|
-
<th><%= t('
|
37
|
-
<th><%= t('
|
47
|
+
<th><%= t('Success') %></th>
|
48
|
+
<th><%= t('Failure') %></th>
|
49
|
+
<th><%= t('TotalExecutionTime') %></th>
|
38
50
|
<th><%= t('AvgExecutionTime') %></th>
|
39
51
|
</tr>
|
40
52
|
<% if job_results.any? %>
|
@@ -48,12 +60,13 @@
|
|
48
60
|
id="<%= id %>"
|
49
61
|
class="metrics-swatch"
|
50
62
|
value="<%= kls %>"
|
63
|
+
<%= visible_kls.include?(kls) ? 'checked' : '' %>
|
51
64
|
/>
|
52
|
-
<code><a href="<%= root_path %>metrics/<%= kls %>"><%= kls %></a></code>
|
65
|
+
<code><a href="<%= root_path %>metrics/<%= kls %>?period=<%= @period %>"><%= kls %></a></code>
|
53
66
|
</div>
|
54
67
|
<script>jobMetricsChart.registerSwatch("<%= id %>")</script>
|
55
68
|
</td>
|
56
|
-
<td><%= jr.dig("totals", "p") %></td>
|
69
|
+
<td><%= jr.dig("totals", "p") - jr.dig("totals", "f") %></td>
|
57
70
|
<td><%= jr.dig("totals", "f") %></td>
|
58
71
|
<td><%= jr.dig("totals", "s").round(2) %> seconds</td>
|
59
72
|
<td><%= jr.total_avg("s").round(2) %> seconds</td>
|