sidekiq 6.5.12 → 7.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changes.md +224 -20
- data/README.md +43 -35
- data/bin/multi_queue_bench +271 -0
- data/bin/sidekiq +3 -8
- data/bin/sidekiqload +204 -118
- data/bin/sidekiqmon +3 -0
- data/lib/sidekiq/api.rb +187 -135
- data/lib/sidekiq/capsule.rb +127 -0
- data/lib/sidekiq/cli.rb +59 -75
- data/lib/sidekiq/client.rb +66 -37
- data/lib/sidekiq/component.rb +4 -1
- data/lib/sidekiq/config.rb +287 -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 +371 -10
- data/lib/sidekiq/job_logger.rb +2 -2
- data/lib/sidekiq/job_retry.rb +36 -18
- data/lib/sidekiq/job_util.rb +51 -15
- data/lib/sidekiq/launcher.rb +71 -65
- data/lib/sidekiq/logger.rb +2 -27
- data/lib/sidekiq/manager.rb +9 -11
- data/lib/sidekiq/metrics/query.rb +7 -4
- data/lib/sidekiq/metrics/shared.rb +8 -7
- data/lib/sidekiq/metrics/tracking.rb +27 -21
- data/lib/sidekiq/middleware/chain.rb +19 -18
- data/lib/sidekiq/middleware/current_attributes.rb +52 -20
- data/lib/sidekiq/monitor.rb +16 -3
- data/lib/sidekiq/paginator.rb +2 -2
- data/lib/sidekiq/processor.rb +46 -51
- data/lib/sidekiq/rails.rb +15 -10
- data/lib/sidekiq/redis_client_adapter.rb +23 -66
- data/lib/sidekiq/redis_connection.rb +15 -117
- data/lib/sidekiq/scheduled.rb +22 -23
- data/lib/sidekiq/testing.rb +32 -41
- data/lib/sidekiq/transaction_aware_client.rb +11 -5
- data/lib/sidekiq/version.rb +2 -1
- data/lib/sidekiq/web/action.rb +8 -3
- data/lib/sidekiq/web/application.rb +108 -15
- data/lib/sidekiq/web/csrf_protection.rb +10 -7
- data/lib/sidekiq/web/helpers.rb +52 -38
- data/lib/sidekiq/web.rb +17 -16
- data/lib/sidekiq/worker_compatibility_alias.rb +13 -0
- data/lib/sidekiq.rb +76 -274
- data/sidekiq.gemspec +12 -10
- data/web/assets/javascripts/application.js +39 -0
- data/web/assets/javascripts/base-charts.js +106 -0
- data/web/assets/javascripts/dashboard-charts.js +182 -0
- data/web/assets/javascripts/dashboard.js +10 -232
- data/web/assets/javascripts/metrics.js +151 -115
- data/web/assets/stylesheets/application-dark.css +4 -0
- data/web/assets/stylesheets/application-rtl.css +10 -89
- data/web/assets/stylesheets/application.css +45 -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 +78 -70
- data/web/locales/es.yml +68 -68
- data/web/locales/fa.yml +65 -65
- data/web/locales/fr.yml +81 -67
- data/web/locales/gd.yml +99 -0
- 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 +67 -69
- 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 +79 -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 +17 -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/_summary.erb +7 -7
- data/web/views/busy.erb +46 -35
- data/web/views/dashboard.erb +26 -5
- data/web/views/filtering.erb +7 -0
- data/web/views/metrics.erb +46 -24
- data/web/views/metrics_for_job.erb +41 -69
- data/web/views/morgue.erb +5 -9
- data/web/views/queue.erb +10 -14
- data/web/views/queues.erb +9 -3
- data/web/views/retries.erb +5 -9
- data/web/views/scheduled.erb +12 -13
- metadata +44 -38
- 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/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,26 +27,25 @@
|
|
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">
|
40
|
-
<
|
41
|
-
<
|
36
|
+
<input class="btn btn-warn" type="submit" name="quiet" value="<%= t('QuietAll') %>" data-confirm="<%= t('AreYouSure') %>"/>
|
37
|
+
<input class="btn btn-danger" type="submit" name="stop" value="<%= t('StopAll') %>" data-confirm="<%= t('AreYouSure') %>"/>
|
42
38
|
</div>
|
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
|
-
<td><%= format_memory(process['rss'].to_i) %></td>
|
77
|
-
<td><%= process['concurrency'] %></td>
|
78
|
-
<td><%= process['busy'] %></td>
|
89
|
+
<td class="num"><%= format_memory(process['rss'].to_i) %></td>
|
90
|
+
<td class="num"><%= number_with_delimiter(process['concurrency']) %></td>
|
91
|
+
<td class="num"><%= number_with_delimiter(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
|
|
@@ -114,14 +125,14 @@
|
|
114
125
|
<th><%= t('Arguments') %></th>
|
115
126
|
<th><%= t('Started') %></th>
|
116
127
|
</thead>
|
117
|
-
<% @workset.each do |process, thread,
|
118
|
-
<% job =
|
128
|
+
<% @workset.each do |process, thread, work| %>
|
129
|
+
<% job = work.job %>
|
119
130
|
<tr>
|
120
131
|
<td><%= process %></td>
|
121
132
|
<td><%= thread %></td>
|
122
133
|
<td><%= job.jid %></td>
|
123
134
|
<td>
|
124
|
-
<a href="<%= root_path %>queues/<%=
|
135
|
+
<a href="<%= root_path %>queues/<%= work.queue %>"><%= work.queue %></a>
|
125
136
|
</td>
|
126
137
|
<td>
|
127
138
|
<%= job.display_class %>
|
@@ -130,7 +141,7 @@
|
|
130
141
|
<td>
|
131
142
|
<div class="args"><%= display_args(job.display_args) %></div>
|
132
143
|
</td>
|
133
|
-
<td><%= relative_time(
|
144
|
+
<td><%= relative_time(work.run_at) %></td>
|
134
145
|
</tr>
|
135
146
|
<% end %>
|
136
147
|
</table>
|
data/web/views/dashboard.erb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
<script type="text/javascript" src="<%= root_path %>javascripts/graph.js"></script>
|
2
1
|
<script type="text/javascript" src="<%= root_path %>javascripts/dashboard.js"></script>
|
3
2
|
<div class= "dashboard clearfix">
|
4
3
|
<h3 >
|
@@ -17,8 +16,19 @@
|
|
17
16
|
</div>
|
18
17
|
|
19
18
|
<div class="row chart">
|
20
|
-
<
|
21
|
-
|
19
|
+
<canvas id="realtime-chart">
|
20
|
+
<%= to_json({
|
21
|
+
processedLabel: t('Processed'),
|
22
|
+
failedLabel: t('Failed'),
|
23
|
+
labels: Array.new(50, ""),
|
24
|
+
processed: Array.new(50),
|
25
|
+
failed: Array.new(50),
|
26
|
+
updateUrl: "#{root_path}stats",
|
27
|
+
}) %>
|
28
|
+
</canvas>
|
29
|
+
|
30
|
+
<!-- start with a space in the legend so the height doesn't change when we add content dynamically -->
|
31
|
+
<div id="realtime-legend"> </div>
|
22
32
|
</div>
|
23
33
|
|
24
34
|
<div class="row header">
|
@@ -34,8 +44,14 @@
|
|
34
44
|
<a href="<%= root_path %>?days=180" class="history-graph <%= "active" if params[:days] == "180" %>"><%= t('SixMonths') %></a>
|
35
45
|
</div>
|
36
46
|
|
37
|
-
<
|
38
|
-
|
47
|
+
<canvas id="history-chart">
|
48
|
+
<%= to_json({
|
49
|
+
processedLabel: t('Processed'),
|
50
|
+
failedLabel: t('Failed'),
|
51
|
+
processed: @processed_history.to_a.reverse,
|
52
|
+
failed: @failed_history.to_a.reverse,
|
53
|
+
}) %>
|
54
|
+
</canvas>
|
39
55
|
</div>
|
40
56
|
|
41
57
|
<br/>
|
@@ -82,3 +98,8 @@
|
|
82
98
|
<% end %>
|
83
99
|
</div>
|
84
100
|
</div>
|
101
|
+
|
102
|
+
<script type="text/javascript" src="<%= root_path %>javascripts/chart.min.js"></script>
|
103
|
+
<script type="text/javascript" src="<%= root_path %>javascripts/chartjs-plugin-annotation.min.js"></script>
|
104
|
+
<script type="text/javascript" src="<%= root_path %>javascripts/base-charts.js"></script>
|
105
|
+
<script type="text/javascript" src="<%= root_path %>javascripts/dashboard-charts.js"></script>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<div>
|
2
|
+
<form method="post" class="form-inline" action='<%= root_path %>filter/<%= which %>'>
|
3
|
+
<%= csrf_tag %>
|
4
|
+
<label for="substr"><%= t('Filter') %></label>
|
5
|
+
<input class="search form-control" type="search" name="substr" value="<%= h params[:substr] %>" placeholder="<%= t('AnyJobContent') %>"/>
|
6
|
+
</form>
|
7
|
+
</div>
|
data/web/views/metrics.erb
CHANGED
@@ -1,8 +1,30 @@
|
|
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/
|
3
|
+
<script type="text/javascript" src="<%= root_path %>javascripts/base-charts.js"></script>
|
4
|
+
|
5
|
+
<div class="header-container">
|
6
|
+
<div class="page-title-container">
|
7
|
+
<h1><%= t('Metrics') %></h1>
|
8
|
+
<a target="blank" href="https://github.com/sidekiq/sidekiq/wiki/Metrics"><span class="info-circle" title="Click to learn more about metrics">?</span></a>
|
9
|
+
</div>
|
4
10
|
|
5
|
-
<
|
11
|
+
<div>
|
12
|
+
<form id="metrics-form" class="form-inline" action="<%= root_path %>filter/metrics" method="post">
|
13
|
+
<%= csrf_tag %>
|
14
|
+
<label for="substr"><%= t('Filter') %></label>
|
15
|
+
<input id="class-filter" class="form-control" type="text" name="substr" placeholder="<%= t('Name') %>" value="<%= h params[:substr] %>">
|
16
|
+
<select id="period-selector" class="form-control" name="period">
|
17
|
+
<% @periods.each_key do |code| %>
|
18
|
+
<% if code == @period %>
|
19
|
+
<option selected value="<%= code %>"><%= code %></option>
|
20
|
+
<% else %>
|
21
|
+
<option value="<%= code %>"><%= code %></option>
|
22
|
+
<% end %>
|
23
|
+
<% end %>
|
24
|
+
</select>
|
25
|
+
</form>
|
26
|
+
</div>
|
27
|
+
</div>
|
6
28
|
|
7
29
|
<%
|
8
30
|
table_limit = 20
|
@@ -11,31 +33,29 @@
|
|
11
33
|
visible_kls = job_results.first(chart_limit).map(&:first)
|
12
34
|
%>
|
13
35
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
window.jobMetricsChart = new JobMetricsOverviewChart(
|
18
|
-
"job-metrics-overview-chart",
|
19
|
-
<%= Sidekiq.dump_json({
|
36
|
+
<% if job_results.any? %>
|
37
|
+
<canvas id="job-metrics-overview-chart">
|
38
|
+
<%= to_json({
|
20
39
|
series: job_results.map { |(kls, jr)| [kls, jr.dig("series", "s")] }.to_h,
|
21
40
|
marks: @query_result.marks.map { |m| [m.bucket, m.label] },
|
22
|
-
visible: visible_kls,
|
23
41
|
labels: @query_result.buckets,
|
42
|
+
visibleKls: visible_kls,
|
43
|
+
yLabel: t('TotalExecutionTime'),
|
44
|
+
units: t('Seconds').downcase,
|
45
|
+
markLabel: t('Deploy'),
|
24
46
|
}) %>
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
<h2>Most Time-Consuming Jobs</h2>
|
47
|
+
</canvas>
|
48
|
+
<% end %>
|
29
49
|
|
30
50
|
<div class="table_container">
|
31
51
|
<table class="table table-bordered table-striped table-hover">
|
32
52
|
<tbody>
|
33
53
|
<tr>
|
34
54
|
<th><%= t('Name') %></th>
|
35
|
-
<th><%= t('
|
36
|
-
<th><%= t('
|
37
|
-
<th><%= t('
|
38
|
-
<th><%= t('AvgExecutionTime')
|
55
|
+
<th><%= t('Success') %></th>
|
56
|
+
<th><%= t('Failure') %></th>
|
57
|
+
<th><%= t('TotalExecutionTime') %> (Seconds)</th>
|
58
|
+
<th><%= t('AvgExecutionTime') %> (Seconds)</th>
|
39
59
|
</tr>
|
40
60
|
<% if job_results.any? %>
|
41
61
|
<% job_results.each_with_index do |(kls, jr), i| %>
|
@@ -48,15 +68,15 @@
|
|
48
68
|
id="<%= id %>"
|
49
69
|
class="metrics-swatch"
|
50
70
|
value="<%= kls %>"
|
71
|
+
<%= visible_kls.include?(kls) ? 'checked' : '' %>
|
51
72
|
/>
|
52
|
-
<code><a href="<%= root_path %>metrics/<%= kls %>"><%= kls %></a></code>
|
73
|
+
<code><a href="<%= root_path %>metrics/<%= kls %>?period=<%= @period %>"><%= kls %></a></code>
|
53
74
|
</div>
|
54
|
-
<script>jobMetricsChart.registerSwatch("<%= id %>")</script>
|
55
75
|
</td>
|
56
|
-
<td><%= jr.dig("totals", "p") %></td>
|
57
|
-
<td><%= jr.dig("totals", "f") %></td>
|
58
|
-
<td><%= jr.dig("totals", "s")
|
59
|
-
<td><%= jr.total_avg("s")
|
76
|
+
<td class="num"><%= number_with_delimiter(jr.dig("totals", "p") - jr.dig("totals", "f")) %></td>
|
77
|
+
<td class="num"><%= number_with_delimiter(jr.dig("totals", "f")) %></td>
|
78
|
+
<td class="num"><%= number_with_delimiter(jr.dig("totals", "s"), precision: 2) %></td>
|
79
|
+
<td class="num"><%= number_with_delimiter(jr.total_avg("s"), precision: 2) %></td>
|
60
80
|
</tr>
|
61
81
|
<% end %>
|
62
82
|
<% else %>
|
@@ -66,4 +86,6 @@
|
|
66
86
|
</table>
|
67
87
|
</div>
|
68
88
|
|
69
|
-
|
89
|
+
<!--p><small>Data from <%= @query_result.starts_at %> to <%= @query_result.ends_at %></small></p-->
|
90
|
+
|
91
|
+
<script type="text/javascript" src="<%= root_path %>javascripts/metrics.js"></script>
|
@@ -1,87 +1,59 @@
|
|
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/
|
3
|
+
<script type="text/javascript" src="<%= root_path %>javascripts/base-charts.js"></script>
|
4
4
|
|
5
5
|
<%
|
6
6
|
job_result = @query_result.job_results[@name]
|
7
|
-
hist_totals = job_result.hist.values.first.zip(*job_result.hist.values[1..-1]).map(&:sum)
|
8
|
-
bucket_labels =Sidekiq::Metrics::Histogram::LABELS
|
9
|
-
bucket_intervals =Sidekiq::Metrics::Histogram::BUCKET_INTERVALS
|
10
|
-
|
11
|
-
# Replace INFINITY since it can't be represented as JSON
|
12
|
-
bucket_intervals[0] = bucket_intervals[1] * 2
|
7
|
+
hist_totals = job_result.hist.values.first.zip(*job_result.hist.values[1..-1]).map(&:sum).reverse
|
8
|
+
bucket_labels = Sidekiq::Metrics::Histogram::LABELS
|
9
|
+
bucket_intervals = Sidekiq::Metrics::Histogram::BUCKET_INTERVALS
|
13
10
|
%>
|
14
11
|
|
15
12
|
<% if job_result.totals["s"] > 0 %>
|
16
|
-
<div class="header-
|
17
|
-
<
|
18
|
-
<
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
</div>
|
23
|
-
|
24
|
-
<canvas id="hist-totals-chart"></canvas>
|
25
|
-
|
26
|
-
<script>
|
27
|
-
window.histTotalsChart = new HistTotalsChart(
|
28
|
-
"hist-totals-chart",
|
29
|
-
<%= Sidekiq.dump_json({
|
30
|
-
series: hist_totals,
|
31
|
-
labels: bucket_labels,
|
32
|
-
}) %>
|
33
|
-
)
|
34
|
-
</script>
|
13
|
+
<div class="header-container">
|
14
|
+
<div class="page-title-container">
|
15
|
+
<h1>
|
16
|
+
<a href="<%= root_path %>metrics?period=<%= @period %>"><%= t('Metrics') %></a> /
|
17
|
+
<%= h @name %>
|
18
|
+
</h1>
|
35
19
|
|
36
|
-
|
20
|
+
<a target="blank" href="https://github.com/sidekiq/sidekiq/wiki/Metrics"><span class="info-circle" title="Click to learn more about metrics">?</span></a>
|
21
|
+
</div>
|
37
22
|
|
38
|
-
|
39
|
-
|
40
|
-
<script>
|
41
|
-
window.histBubbleChart = new HistBubbleChart(
|
42
|
-
"hist-bubble-chart",
|
43
|
-
<%= Sidekiq.dump_json({
|
44
|
-
hist: job_result.hist,
|
45
|
-
marks: @query_result.marks.map { |m| [m.bucket, m.label] },
|
46
|
-
labels: @query_result.buckets,
|
47
|
-
histIntervals: bucket_intervals,
|
48
|
-
}) %>
|
49
|
-
)
|
50
|
-
</script>
|
51
|
-
|
52
|
-
<div class="table_container">
|
53
|
-
<table class="table table-bordered table-striped table-hover">
|
54
|
-
<tbody>
|
55
|
-
<tr>
|
56
|
-
<th><%= t('Time') %></th>
|
57
|
-
<th><%= t('Processed') %></th>
|
58
|
-
<th><%= t('Failed') %></th>
|
59
|
-
<th><%= t('ExecutionTime') %></th>
|
60
|
-
<th><%= t('AvgExecutionTime') %></th>
|
61
|
-
</tr>
|
62
|
-
<% @query_result.buckets.reverse.each do |bucket| %>
|
63
|
-
<tr>
|
64
|
-
<td><%= bucket %></td>
|
65
|
-
<td><%= job_result.series.dig("p", bucket) %></td>
|
66
|
-
<td><%= job_result.series.dig("f", bucket) %></td>
|
67
|
-
<% if (total_sec = job_result.series.dig("s", bucket)) > 0 %>
|
68
|
-
<td><%= total_sec.round(2) %> seconds</td>
|
69
|
-
<td><%= job_result.series_avg("s")[bucket].round(2) %> seconds</td>
|
70
|
-
<% else %>
|
71
|
-
<td>—</td>
|
72
|
-
<td>—</td>
|
73
|
-
<% end %>
|
74
|
-
</tr>
|
75
|
-
<% end %>
|
76
|
-
</tbody>
|
77
|
-
</table>
|
23
|
+
<%= erb :_metrics_period_select, locals: { periods: @periods, period: @period, path: "#{root_path}metrics/#{@name}" } %>
|
78
24
|
</div>
|
79
|
-
|
25
|
+
|
26
|
+
<canvas id="hist-totals-chart">
|
27
|
+
<%= to_json({
|
28
|
+
series: hist_totals,
|
29
|
+
labels: bucket_labels,
|
30
|
+
xLabel: t('ExecutionTime'),
|
31
|
+
yLabel: t('Jobs'),
|
32
|
+
units: t('Jobs').downcase,
|
33
|
+
}) %>
|
34
|
+
</canvas>
|
35
|
+
|
36
|
+
<canvas id="hist-bubble-chart">
|
37
|
+
<%= to_json({
|
38
|
+
hist: job_result.hist,
|
39
|
+
marks: @query_result.marks.map { |m| [m.bucket, m.label] },
|
40
|
+
labels: @query_result.buckets,
|
41
|
+
histIntervals: bucket_intervals,
|
42
|
+
yLabel: t('ExecutionTime'),
|
43
|
+
markLabel: t('Deploy'),
|
44
|
+
yUnits: t('Seconds').downcase,
|
45
|
+
zUnits: t('Jobs').downcase,
|
46
|
+
}) %>
|
47
|
+
</canvas>
|
48
|
+
|
49
|
+
<!--p><small>Data from <%= @query_result.starts_at %> to <%= @query_result.ends_at %></small></p-->
|
80
50
|
<% else %>
|
81
51
|
<h1>
|
82
|
-
<a href="<%= root_path %>/metrics"><%= t(
|
52
|
+
<a href="<%= root_path %>/metrics"><%= t('Metrics') %></a> /
|
83
53
|
<%= h @name %>
|
84
54
|
</h1>
|
85
55
|
|
86
56
|
<div class="alert alert-success"><%= t('NoJobMetricsFound') %></div>
|
87
57
|
<% end %>
|
58
|
+
|
59
|
+
<script type="text/javascript" src="<%= root_path %>javascripts/metrics.js"></script>
|
data/web/views/morgue.erb
CHANGED
@@ -1,14 +1,10 @@
|
|
1
|
-
<
|
2
|
-
<
|
3
|
-
<h3><%= t('DeadJobs') %></h3>
|
4
|
-
</div>
|
1
|
+
<div class="header-container">
|
2
|
+
<h1><%= t('DeadJobs') %></h1>
|
5
3
|
<% if @dead.size > 0 && @total_size > @count %>
|
6
|
-
|
7
|
-
<%= erb :_paging, locals: { url: "#{root_path}morgue" } %>
|
8
|
-
</div>
|
4
|
+
<%= erb :_paging, locals: { url: "#{root_path}morgue" } %>
|
9
5
|
<% end %>
|
10
6
|
<%= filtering('dead') %>
|
11
|
-
</
|
7
|
+
</div>
|
12
8
|
|
13
9
|
<% if @dead.size > 0 %>
|
14
10
|
<form action="<%= root_path %>morgue" method="post">
|
@@ -33,7 +29,7 @@
|
|
33
29
|
<tr>
|
34
30
|
<td class="table-checkbox">
|
35
31
|
<label>
|
36
|
-
<input type='checkbox' name='key[]' value='<%= job_params(entry.item, entry.score) %>' />
|
32
|
+
<input type='checkbox' name='key[]' value='<%= job_params(entry.item, entry.score) %>' class='shift_clickable' />
|
37
33
|
</label>
|
38
34
|
</td>
|
39
35
|
<td>
|
data/web/views/queue.erb
CHANGED
@@ -1,17 +1,13 @@
|
|
1
|
-
<
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
<div class="col-sm-4 pull-right flip">
|
12
|
-
<%= erb :_paging, locals: { url: "#{root_path}queues/#{CGI.escape(@name)}" } %>
|
13
|
-
</div>
|
14
|
-
</header>
|
1
|
+
<div class="header-container">
|
2
|
+
<h1><%= t('CurrentMessagesInQueue', :queue => h(@name)) %>
|
3
|
+
<% if @queue.paused? %>
|
4
|
+
<span class="label label-danger"><%= t('Paused') %></span>
|
5
|
+
<% end %>
|
6
|
+
<span class="badge badge-secondary"><%= number_with_delimiter(@total_size) %></span>
|
7
|
+
</h1>
|
8
|
+
<%= erb :_paging, locals: { url: "#{root_path}queues/#{CGI.escape(@name)}" } %>
|
9
|
+
</div>
|
10
|
+
|
15
11
|
<div class="table_container">
|
16
12
|
<table class="queue table table-hover table-bordered table-striped">
|
17
13
|
<thead>
|
data/web/views/queues.erb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
<
|
1
|
+
<div class="header-container">
|
2
|
+
<h1><%= t('Queues') %></h1>
|
3
|
+
</div>
|
2
4
|
|
3
5
|
<div class="table_container">
|
4
6
|
<table class="queues table table-hover table-bordered table-striped">
|
@@ -16,8 +18,12 @@
|
|
16
18
|
<span class="label label-danger"><%= t('Paused') %></span>
|
17
19
|
<% end %>
|
18
20
|
</td>
|
19
|
-
<td><%= number_with_delimiter(queue.size) %> </td>
|
20
|
-
<td
|
21
|
+
<td class="num"><%= number_with_delimiter(queue.size) %> </td>
|
22
|
+
<td class="num">
|
23
|
+
<% queue_latency = queue.latency %>
|
24
|
+
<%= (queue_latency < 60) ? '' : " (#{relative_time(Time.at(Time.now.to_f - queue_latency))})" %>
|
25
|
+
<%= number_with_delimiter(queue_latency, precision: 2) %>
|
26
|
+
</td>
|
21
27
|
<td class="delete-confirm">
|
22
28
|
<form action="<%=root_path %>queues/<%= CGI.escape(queue.name) %>" method="post">
|
23
29
|
<%= csrf_tag %>
|
data/web/views/retries.erb
CHANGED
@@ -1,14 +1,10 @@
|
|
1
|
-
<
|
2
|
-
<
|
3
|
-
<h3><%= t('Retries') %></h3>
|
4
|
-
</div>
|
1
|
+
<div class="header-container">
|
2
|
+
<h1><%= t('Retries') %></h1>
|
5
3
|
<% if @retries.size > 0 && @total_size > @count %>
|
6
|
-
|
7
|
-
<%= erb :_paging, locals: { url: "#{root_path}retries" } %>
|
8
|
-
</div>
|
4
|
+
<%= erb :_paging, locals: { url: "#{root_path}retries" } %>
|
9
5
|
<% end %>
|
10
6
|
<%= filtering('retries') %>
|
11
|
-
</
|
7
|
+
</div>
|
12
8
|
|
13
9
|
<% if @retries.size > 0 %>
|
14
10
|
<form action="<%= root_path %>retries" method="post">
|
@@ -34,7 +30,7 @@
|
|
34
30
|
<tr>
|
35
31
|
<td class="table-checkbox">
|
36
32
|
<label>
|
37
|
-
<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' />
|
38
34
|
</label>
|
39
35
|
</td>
|
40
36
|
<td>
|
data/web/views/scheduled.erb
CHANGED
@@ -1,25 +1,22 @@
|
|
1
|
-
<
|
2
|
-
<
|
3
|
-
<h3><%= t('ScheduledJobs') %></h3>
|
4
|
-
</div>
|
1
|
+
<div class="header-container">
|
2
|
+
<h1><%= t('ScheduledJobs') %></h1>
|
5
3
|
<% if @scheduled.size > 0 && @total_size > @count %>
|
6
|
-
|
7
|
-
<%= erb :_paging, locals: { url: "#{root_path}scheduled" } %>
|
8
|
-
</div>
|
4
|
+
<%= erb :_paging, locals: { url: "#{root_path}scheduled" } %>
|
9
5
|
<% end %>
|
10
6
|
<%= filtering('scheduled') %>
|
11
|
-
</
|
7
|
+
</div>
|
12
8
|
|
13
9
|
<% if @scheduled.size > 0 %>
|
14
|
-
|
15
10
|
<form action="<%= root_path %>scheduled" method="post">
|
16
11
|
<%= csrf_tag %>
|
17
12
|
<div class="table_container">
|
18
13
|
<table class="table table-striped table-bordered table-hover">
|
19
14
|
<thead>
|
20
15
|
<tr>
|
21
|
-
<th class="checkbox-column">
|
22
|
-
<
|
16
|
+
<th class="table-checkbox checkbox-column">
|
17
|
+
<label>
|
18
|
+
<input type="checkbox" class="check_all" />
|
19
|
+
</label>
|
23
20
|
</th>
|
24
21
|
<th><%= t('When') %></th>
|
25
22
|
<th><%= t('Queue') %></th>
|
@@ -29,8 +26,10 @@
|
|
29
26
|
</thead>
|
30
27
|
<% @scheduled.each do |entry| %>
|
31
28
|
<tr>
|
32
|
-
<td>
|
33
|
-
<
|
29
|
+
<td class="table-checkbox">
|
30
|
+
<label>
|
31
|
+
<input type='checkbox' name='key[]' value='<%= job_params(entry.item, entry.score) %>' class='shift_clickable' />
|
32
|
+
</label>
|
34
33
|
</td>
|
35
34
|
<td>
|
36
35
|
<a href="<%= root_path %>scheduled/<%= job_params(entry.item, entry.score) %>"><%= relative_time(entry.at) %></a>
|