sidekiq 4.2.4 → 6.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/Changes.md +445 -0
- data/LICENSE +1 -1
- data/README.md +21 -34
- data/bin/sidekiq +26 -2
- data/bin/sidekiqload +28 -38
- data/bin/sidekiqmon +8 -0
- data/lib/generators/sidekiq/templates/worker_spec.rb.erb +1 -1
- data/lib/generators/sidekiq/templates/worker_test.rb.erb +2 -2
- data/lib/generators/sidekiq/worker_generator.rb +21 -13
- data/lib/sidekiq/api.rb +347 -213
- data/lib/sidekiq/cli.rb +221 -212
- data/lib/sidekiq/client.rb +75 -52
- data/lib/sidekiq/delay.rb +41 -0
- data/lib/sidekiq/exception_handler.rb +12 -16
- data/lib/sidekiq/extensions/action_mailer.rb +13 -22
- data/lib/sidekiq/extensions/active_record.rb +13 -10
- data/lib/sidekiq/extensions/class_methods.rb +14 -11
- data/lib/sidekiq/extensions/generic_proxy.rb +10 -4
- data/lib/sidekiq/fetch.rb +38 -31
- data/lib/sidekiq/job_logger.rb +63 -0
- data/lib/sidekiq/job_retry.rb +263 -0
- data/lib/sidekiq/launcher.rb +169 -70
- data/lib/sidekiq/logger.rb +166 -0
- data/lib/sidekiq/manager.rb +17 -20
- data/lib/sidekiq/middleware/chain.rb +15 -5
- data/lib/sidekiq/middleware/i18n.rb +5 -7
- data/lib/sidekiq/monitor.rb +133 -0
- data/lib/sidekiq/paginator.rb +18 -14
- data/lib/sidekiq/processor.rb +161 -70
- data/lib/sidekiq/rails.rb +30 -73
- data/lib/sidekiq/redis_connection.rb +67 -20
- data/lib/sidekiq/scheduled.rb +61 -35
- data/lib/sidekiq/sd_notify.rb +149 -0
- data/lib/sidekiq/systemd.rb +24 -0
- data/lib/sidekiq/testing/inline.rb +2 -1
- data/lib/sidekiq/testing.rb +54 -26
- data/lib/sidekiq/util.rb +48 -15
- data/lib/sidekiq/version.rb +2 -1
- data/lib/sidekiq/web/action.rb +15 -15
- data/lib/sidekiq/web/application.rb +112 -89
- data/lib/sidekiq/web/csrf_protection.rb +180 -0
- data/lib/sidekiq/web/helpers.rb +153 -73
- data/lib/sidekiq/web/router.rb +27 -19
- data/lib/sidekiq/web.rb +64 -109
- data/lib/sidekiq/worker.rb +164 -41
- data/lib/sidekiq.rb +86 -60
- data/sidekiq.gemspec +24 -22
- data/web/assets/images/apple-touch-icon.png +0 -0
- data/web/assets/javascripts/application.js +25 -27
- data/web/assets/javascripts/dashboard.js +34 -38
- data/web/assets/stylesheets/application-dark.css +160 -0
- data/web/assets/stylesheets/application-rtl.css +246 -0
- data/web/assets/stylesheets/application.css +402 -12
- data/web/assets/stylesheets/bootstrap-rtl.min.css +9 -0
- data/web/assets/stylesheets/bootstrap.css +2 -2
- data/web/locales/ar.yml +81 -0
- data/web/locales/de.yml +14 -2
- data/web/locales/en.yml +4 -0
- data/web/locales/es.yml +4 -3
- data/web/locales/fa.yml +80 -0
- data/web/locales/fr.yml +3 -3
- data/web/locales/he.yml +79 -0
- data/web/locales/ja.yml +9 -4
- data/web/locales/lt.yml +83 -0
- data/web/locales/pl.yml +4 -4
- data/web/locales/ru.yml +4 -0
- data/web/locales/ur.yml +80 -0
- data/web/locales/vi.yml +83 -0
- data/web/views/_footer.erb +5 -2
- data/web/views/_job_info.erb +3 -2
- data/web/views/_nav.erb +4 -18
- data/web/views/_paging.erb +1 -1
- data/web/views/busy.erb +57 -19
- data/web/views/dashboard.erb +3 -3
- data/web/views/dead.erb +2 -2
- data/web/views/layout.erb +13 -2
- data/web/views/morgue.erb +19 -12
- data/web/views/queue.erb +22 -12
- data/web/views/queues.erb +13 -3
- data/web/views/retries.erb +22 -13
- data/web/views/retry.erb +3 -3
- data/web/views/scheduled.erb +7 -4
- metadata +42 -194
- data/.github/contributing.md +0 -32
- data/.github/issue_template.md +0 -4
- data/.gitignore +0 -12
- data/.travis.yml +0 -12
- data/3.0-Upgrade.md +0 -70
- data/4.0-Upgrade.md +0 -53
- data/COMM-LICENSE +0 -95
- data/Ent-Changes.md +0 -146
- data/Gemfile +0 -29
- data/Pro-2.0-Upgrade.md +0 -138
- data/Pro-3.0-Upgrade.md +0 -44
- data/Pro-Changes.md +0 -585
- data/Rakefile +0 -9
- data/bin/sidekiqctl +0 -99
- data/code_of_conduct.md +0 -50
- data/lib/sidekiq/core_ext.rb +0 -106
- data/lib/sidekiq/logging.rb +0 -106
- data/lib/sidekiq/middleware/server/active_record.rb +0 -13
- data/lib/sidekiq/middleware/server/logging.rb +0 -40
- data/lib/sidekiq/middleware/server/retry_jobs.rb +0 -205
- data/test/config.yml +0 -9
- data/test/env_based_config.yml +0 -11
- data/test/fake_env.rb +0 -1
- data/test/fixtures/en.yml +0 -2
- data/test/helper.rb +0 -75
- data/test/test_actors.rb +0 -138
- data/test/test_api.rb +0 -528
- data/test/test_cli.rb +0 -418
- data/test/test_client.rb +0 -266
- data/test/test_exception_handler.rb +0 -56
- data/test/test_extensions.rb +0 -127
- data/test/test_fetch.rb +0 -50
- data/test/test_launcher.rb +0 -95
- data/test/test_logging.rb +0 -35
- data/test/test_manager.rb +0 -50
- data/test/test_middleware.rb +0 -158
- data/test/test_processor.rb +0 -235
- data/test/test_rails.rb +0 -22
- data/test/test_redis_connection.rb +0 -132
- data/test/test_retry.rb +0 -326
- data/test/test_retry_exhausted.rb +0 -149
- data/test/test_scheduled.rb +0 -115
- data/test/test_scheduling.rb +0 -58
- data/test/test_sidekiq.rb +0 -107
- data/test/test_testing.rb +0 -143
- data/test/test_testing_fake.rb +0 -357
- data/test/test_testing_inline.rb +0 -94
- data/test/test_util.rb +0 -13
- data/test/test_web.rb +0 -726
- data/test/test_web_helpers.rb +0 -54
data/web/views/busy.erb
CHANGED
|
@@ -1,27 +1,59 @@
|
|
|
1
1
|
<div class="row header">
|
|
2
|
-
<div class="col-sm-
|
|
2
|
+
<div class="col-sm-4 pull-left flip">
|
|
3
|
+
<h3><%= t('Status') %></h3>
|
|
4
|
+
</div>
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
<div class="table_container">
|
|
8
|
+
<div class="stats-container">
|
|
9
|
+
<div class="stat">
|
|
10
|
+
<h3><%= s = processes.size; number_with_delimiter(s) %></h3>
|
|
11
|
+
<p><%= t('Processes') %></p>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="stat">
|
|
14
|
+
<h3><%= x = processes.total_concurrency; number_with_delimiter(x) %></h3>
|
|
15
|
+
<p><%= t('Threads') %></p>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="stat">
|
|
18
|
+
<h3><%= ws = workers.size; number_with_delimiter(ws) %></h3>
|
|
19
|
+
<p><%= t('Busy') %></p>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="stat">
|
|
22
|
+
<h3><%= x == 0 ? 0 : ((ws / x.to_f) * 100).round(0) %>%</h3>
|
|
23
|
+
<p><%= t('Utilization') %></p>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="stat">
|
|
26
|
+
<h3><%= format_memory(processes.total_rss) %></h3>
|
|
27
|
+
<p><%= t('RSS') %></p>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<div class="row header">
|
|
33
|
+
<div class="col-sm-4 pull-left flip">
|
|
3
34
|
<h3><%= t('Processes') %></h3>
|
|
4
35
|
</div>
|
|
5
|
-
<div class="col-sm-
|
|
36
|
+
<div class="col-sm-3 pull-right flip">
|
|
6
37
|
<form method="POST" class="warning-messages">
|
|
7
38
|
<%= csrf_tag %>
|
|
8
|
-
<div class="btn-group pull-right">
|
|
39
|
+
<div class="btn-group pull-right flip">
|
|
9
40
|
<button class="btn btn-warn" type="submit" name="quiet" value="1" data-confirm="<%= t('AreYouSure') %>"><%= t('QuietAll') %></button>
|
|
10
41
|
<button class="btn btn-danger" type="submit" name="stop" value="1" data-confirm="<%= t('AreYouSure') %>"><%= t('StopAll') %></button>
|
|
11
42
|
</div>
|
|
12
43
|
</form>
|
|
13
44
|
</div>
|
|
14
45
|
</div>
|
|
15
|
-
|
|
16
46
|
<div class="table_container">
|
|
17
|
-
<table class="processes table table-hover table-bordered table-striped
|
|
47
|
+
<table class="processes table table-hover table-bordered table-striped">
|
|
18
48
|
<thead>
|
|
19
49
|
<th><%= t('Name') %></th>
|
|
20
50
|
<th><%= t('Started') %></th>
|
|
21
|
-
<th><%= t('
|
|
22
|
-
<th><%= t('
|
|
51
|
+
<th class="col-sm-1"><%= t('RSS') %><a href="https://github.com/mperham/sidekiq/wiki/Memory#rss"><span class="info-circle" title="Click to learn more about RSS">?</span></a></th>
|
|
52
|
+
<th class="col-sm-1"><%= t('Threads') %></th>
|
|
53
|
+
<th class="col-sm-1"><%= t('Busy') %></th>
|
|
23
54
|
<th> </th>
|
|
24
55
|
</thead>
|
|
56
|
+
<% lead = processes.leader %>
|
|
25
57
|
<% processes.each do |process| %>
|
|
26
58
|
<tr>
|
|
27
59
|
<td class="box">
|
|
@@ -31,26 +63,29 @@
|
|
|
31
63
|
<span class="label label-info"><%= label %></span>
|
|
32
64
|
<% end %>
|
|
33
65
|
<% if process.stopping? %>
|
|
34
|
-
<span class="label label-danger">
|
|
66
|
+
<span class="label label-danger">quiet</span>
|
|
67
|
+
<% end %>
|
|
68
|
+
<% if process.identity == lead %>
|
|
69
|
+
<span class="label label-warning">leader</span>
|
|
35
70
|
<% end %>
|
|
36
71
|
<br>
|
|
37
72
|
<b><%= "#{t('Queues')}: " %></b>
|
|
38
73
|
<%= process['queues'] * ", " %>
|
|
39
74
|
</td>
|
|
40
75
|
<td><%= relative_time(Time.at(process['started_at'])) %></td>
|
|
76
|
+
<td><%= format_memory(process['rss'].to_i) %></td>
|
|
41
77
|
<td><%= process['concurrency'] %></td>
|
|
42
78
|
<td><%= process['busy'] %></td>
|
|
43
79
|
<td>
|
|
44
|
-
<
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
<% end %>
|
|
80
|
+
<form method="POST">
|
|
81
|
+
<%= csrf_tag %>
|
|
82
|
+
<input type="hidden" name="identity" value="<%= process['identity'] %>"/>
|
|
83
|
+
|
|
84
|
+
<div class="btn-group pull-right flip">
|
|
85
|
+
<% unless process.stopping? %><button class="btn btn-warn" type="submit" name="quiet" value="1"><%= t('Quiet') %></button><% end %>
|
|
51
86
|
<button class="btn btn-danger" type="submit" name="stop" value="1"><%= t('Stop') %></button>
|
|
52
|
-
</
|
|
53
|
-
</
|
|
87
|
+
</div>
|
|
88
|
+
</form>
|
|
54
89
|
</td>
|
|
55
90
|
</tr>
|
|
56
91
|
<% end %>
|
|
@@ -64,7 +99,7 @@
|
|
|
64
99
|
</div>
|
|
65
100
|
|
|
66
101
|
<div class="table_container">
|
|
67
|
-
<table class="workers table table-hover table-bordered table-striped
|
|
102
|
+
<table class="workers table table-hover table-bordered table-striped">
|
|
68
103
|
<thead>
|
|
69
104
|
<th><%= t('Process') %></th>
|
|
70
105
|
<th><%= t('TID') %></th>
|
|
@@ -83,7 +118,10 @@
|
|
|
83
118
|
<td>
|
|
84
119
|
<a href="<%= root_path %>queues/<%= msg['queue'] %>"><%= msg['queue'] %></a>
|
|
85
120
|
</td>
|
|
86
|
-
<td
|
|
121
|
+
<td>
|
|
122
|
+
<%= job.display_class %>
|
|
123
|
+
<%= display_tags(job, nil) %>
|
|
124
|
+
</td>
|
|
87
125
|
<td>
|
|
88
126
|
<div class="args"><%= display_args(job.display_args) %></div>
|
|
89
127
|
</td>
|
data/web/views/dashboard.erb
CHANGED
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
<span class="dot"></span>
|
|
8
8
|
</span>
|
|
9
9
|
</h3>
|
|
10
|
-
<div class="interval-slider">
|
|
10
|
+
<div class="interval-slider ltr">
|
|
11
11
|
<span class="interval-slider-label"><%= t('PollingInterval') %>:</span>
|
|
12
|
-
<span class="current-interval">
|
|
12
|
+
<span class="current-interval">5 sec</span>
|
|
13
13
|
<br/>
|
|
14
|
-
<input type="range" min="2000" max="20000" step="1000" value="
|
|
14
|
+
<input type="range" min="2000" max="20000" step="1000" value="5000"/>
|
|
15
15
|
</div>
|
|
16
16
|
</div>
|
|
17
17
|
|
data/web/views/dead.erb
CHANGED
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
<th><%= t('ErrorMessage') %></th>
|
|
15
15
|
<td><%= h(@dead['error_message']) %></td>
|
|
16
16
|
</tr>
|
|
17
|
-
<% if
|
|
17
|
+
<% if @dead.error_backtrace %>
|
|
18
18
|
<tr>
|
|
19
19
|
<th><%= t('ErrorBacktrace') %></th>
|
|
20
20
|
<td>
|
|
21
|
-
<code><%= @dead
|
|
21
|
+
<code><%= @dead.error_backtrace.join("<br/>") %></code>
|
|
22
22
|
</td>
|
|
23
23
|
</tr>
|
|
24
24
|
<% end %>
|
data/web/views/layout.erb
CHANGED
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
<!doctype html>
|
|
2
|
-
<html>
|
|
2
|
+
<html dir="<%= text_direction %>">
|
|
3
3
|
<head>
|
|
4
4
|
<title><%= environment_title_prefix %><%= Sidekiq::NAME %></title>
|
|
5
|
-
<meta charset="
|
|
5
|
+
<meta charset="utf-8" />
|
|
6
6
|
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
|
+
|
|
7
8
|
<link href="<%= root_path %>stylesheets/bootstrap.css" media="screen" rel="stylesheet" type="text/css" />
|
|
9
|
+
<% if rtl? %>
|
|
10
|
+
<link href="<%= root_path %>stylesheets/bootstrap-rtl.min.css" media="screen" rel="stylesheet" type="text/css"/>
|
|
11
|
+
<% end %>
|
|
12
|
+
|
|
8
13
|
<link href="<%= root_path %>stylesheets/application.css" media="screen" rel="stylesheet" type="text/css" />
|
|
14
|
+
<link href="<%= root_path %>stylesheets/application-dark.css" media="screen and (prefers-color-scheme: dark)" rel="stylesheet" type="text/css" />
|
|
15
|
+
<% if rtl? %>
|
|
16
|
+
<link href="<%= root_path %>stylesheets/application-rtl.css" media="screen" rel="stylesheet" type="text/css" />
|
|
17
|
+
<% end %>
|
|
18
|
+
|
|
19
|
+
<link rel="apple-touch-icon" href="<%= root_path %>images/apple-touch-icon.png">
|
|
9
20
|
<link rel="shortcut icon" type="image/ico" href="<%= root_path %>images/favicon.ico" />
|
|
10
21
|
<script type="text/javascript" src="<%= root_path %>javascripts/application.js"></script>
|
|
11
22
|
<meta name="google" content="notranslate" />
|
data/web/views/morgue.erb
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<form action="<%= root_path %>morgue" method="post">
|
|
15
15
|
<%= csrf_tag %>
|
|
16
16
|
<div class="table_container">
|
|
17
|
-
<table class="table table-striped table-bordered
|
|
17
|
+
<table class="table table-striped table-bordered">
|
|
18
18
|
<thead>
|
|
19
19
|
<tr>
|
|
20
20
|
<th class="table-checkbox checkbox-column">
|
|
@@ -42,29 +42,36 @@
|
|
|
42
42
|
<td>
|
|
43
43
|
<a href="<%= root_path %>queues/<%= entry.queue %>"><%= entry.queue %></a>
|
|
44
44
|
</td>
|
|
45
|
-
<td
|
|
45
|
+
<td>
|
|
46
|
+
<%= entry.display_class %>
|
|
47
|
+
<%= display_tags(entry, "morgue") %>
|
|
48
|
+
</td>
|
|
46
49
|
<td>
|
|
47
50
|
<div class="args"><%= display_args(entry.display_args) %></div>
|
|
48
51
|
</td>
|
|
49
52
|
<td>
|
|
53
|
+
<% if entry.error? %>
|
|
50
54
|
<div><%= h truncate("#{entry['error_class']}: #{entry['error_message']}", 200) %></div>
|
|
55
|
+
<% end %>
|
|
51
56
|
</td>
|
|
52
57
|
</tr>
|
|
53
58
|
<% end %>
|
|
54
59
|
</table>
|
|
55
60
|
</div>
|
|
56
|
-
<input class="btn btn-primary btn-xs pull-left" type="submit" name="retry" value="<%= t('RetryNow') %>" />
|
|
57
|
-
<input class="btn btn-danger btn-xs pull-left" type="submit" name="delete" value="<%= t('Delete') %>" />
|
|
61
|
+
<input class="btn btn-primary btn-xs pull-left flip" type="submit" name="retry" value="<%= t('RetryNow') %>" />
|
|
62
|
+
<input class="btn btn-danger btn-xs pull-left flip" type="submit" name="delete" value="<%= t('Delete') %>" />
|
|
58
63
|
</form>
|
|
59
64
|
|
|
60
|
-
|
|
61
|
-
<%=
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
<%=
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
<% unfiltered? do %>
|
|
66
|
+
<form action="<%= root_path %>morgue/all/delete" method="post">
|
|
67
|
+
<%= csrf_tag %>
|
|
68
|
+
<input class="btn btn-danger btn-xs pull-right flip" type="submit" name="delete" value="<%= t('DeleteAll') %>" data-confirm="<%= t('AreYouSure') %>" />
|
|
69
|
+
</form>
|
|
70
|
+
<form action="<%= root_path %>morgue/all/retry" method="post">
|
|
71
|
+
<%= csrf_tag %>
|
|
72
|
+
<input class="btn btn-danger btn-xs pull-right flip" type="submit" name="retry" value="<%= t('RetryAll') %>" data-confirm="<%= t('AreYouSure') %>" />
|
|
73
|
+
</form>
|
|
74
|
+
<% end %>
|
|
68
75
|
|
|
69
76
|
<% else %>
|
|
70
77
|
<div class="alert alert-success"><%= t('NoDeadJobsFound') %></div>
|
data/web/views/queue.erb
CHANGED
|
@@ -5,36 +5,46 @@
|
|
|
5
5
|
<% if @queue.paused? %>
|
|
6
6
|
<span class="label label-danger"><%= t('Paused') %></span>
|
|
7
7
|
<% end %>
|
|
8
|
+
<span class="badge badge-secondary"><%= number_with_delimiter(@total_size) %></span>
|
|
8
9
|
</h3>
|
|
9
10
|
</div>
|
|
10
|
-
<div class="col-sm-4 pull-right">
|
|
11
|
-
<%= erb :_paging, locals: { url: "#{root_path}queues/#{@name}" } %>
|
|
11
|
+
<div class="col-sm-4 pull-right flip">
|
|
12
|
+
<%= erb :_paging, locals: { url: "#{root_path}queues/#{CGI.escape(@name)}" } %>
|
|
12
13
|
</div>
|
|
13
14
|
</header>
|
|
14
15
|
<div class="table_container">
|
|
15
16
|
<table class="queue table table-hover table-bordered table-striped">
|
|
16
17
|
<thead>
|
|
18
|
+
<th><a href="<%= url %>?direction=<%= params[:direction] == 'asc' ? 'desc' : 'asc' %>"># <%= sort_direction_label %></a></th>
|
|
17
19
|
<th><%= t('Job') %></th>
|
|
18
20
|
<th><%= t('Arguments') %></th>
|
|
19
21
|
<th></th>
|
|
20
22
|
</thead>
|
|
21
23
|
<% @messages.each_with_index do |msg, index| %>
|
|
22
24
|
<tr>
|
|
23
|
-
|
|
25
|
+
<% if params[:direction] == 'asc' %>
|
|
26
|
+
<td><%= @count * (@current_page - 1) + index + 1 %></td>
|
|
27
|
+
<% else %>
|
|
28
|
+
<td><%= @total_size - (@count * (@current_page - 1) + index) %></td>
|
|
29
|
+
<% end %>
|
|
24
30
|
<td>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
<%= h(msg.display_class) %>
|
|
32
|
+
<%= display_tags(msg, nil) %>
|
|
33
|
+
</td>
|
|
34
|
+
<td>
|
|
35
|
+
<% a = msg.display_args %>
|
|
36
|
+
<% if a.inspect.size > 100 %>
|
|
37
|
+
<span class="worker_<%= index %>"><%= h(a.inspect[0..100]) + "... " %></span>
|
|
38
|
+
<button data-toggle="collapse" data-target=".worker_<%= index %>" class="btn btn-default btn-xs"><%= t('ShowAll') %></button>
|
|
39
|
+
<div class="toggle worker_<%= index %>"><%= display_args(a) %></div>
|
|
30
40
|
<% else %>
|
|
31
|
-
<%=
|
|
41
|
+
<%= display_args(msg.display_args) %>
|
|
32
42
|
<% end %>
|
|
33
43
|
</td>
|
|
34
44
|
<td>
|
|
35
|
-
<form action="<%= root_path %>queues/<%= @name %>/delete" method="post">
|
|
45
|
+
<form action="<%= root_path %>queues/<%= CGI.escape(@name) %>/delete" method="post">
|
|
36
46
|
<%= csrf_tag %>
|
|
37
|
-
<input name="key_val" value="<%= h
|
|
47
|
+
<input name="key_val" value="<%= h msg.value %>" type="hidden" />
|
|
38
48
|
<input class="btn btn-danger btn-xs" type="submit" name="delete" value="<%= t('Delete') %>" data-confirm="<%= t('AreYouSure') %>" />
|
|
39
49
|
</form>
|
|
40
50
|
</td>
|
|
@@ -42,4 +52,4 @@
|
|
|
42
52
|
<% end %>
|
|
43
53
|
</table>
|
|
44
54
|
</div>
|
|
45
|
-
<%= erb :_paging, locals: { url: "#{root_path}queues/#{@name}" } %>
|
|
55
|
+
<%= erb :_paging, locals: { url: "#{root_path}queues/#{CGI.escape(@name)}" } %>
|
data/web/views/queues.erb
CHANGED
|
@@ -1,25 +1,35 @@
|
|
|
1
1
|
<h3><%= t('Queues') %></h3>
|
|
2
2
|
|
|
3
3
|
<div class="table_container">
|
|
4
|
-
<table class="queues table table-hover table-bordered table-striped
|
|
4
|
+
<table class="queues table table-hover table-bordered table-striped">
|
|
5
5
|
<thead>
|
|
6
6
|
<th><%= t('Queue') %></th>
|
|
7
7
|
<th><%= t('Size') %></th>
|
|
8
|
+
<th><%= t('Latency') %></th>
|
|
8
9
|
<th><%= t('Actions') %></th>
|
|
9
10
|
</thead>
|
|
10
11
|
<% @queues.each do |queue| %>
|
|
11
12
|
<tr>
|
|
12
13
|
<td>
|
|
13
|
-
<a href="<%= root_path %>queues/<%= queue.name %>"><%= queue.name %></a>
|
|
14
|
+
<a href="<%= root_path %>queues/<%= CGI.escape(queue.name) %>"><%= h queue.name %></a>
|
|
14
15
|
<% if queue.paused? %>
|
|
15
16
|
<span class="label label-danger"><%= t('Paused') %></span>
|
|
16
17
|
<% end %>
|
|
17
18
|
</td>
|
|
18
19
|
<td><%= number_with_delimiter(queue.size) %> </td>
|
|
20
|
+
<td><% queue_latency = queue.latency %><%= number_with_delimiter(queue_latency.round(2)) %><%= (queue_latency < 60) ? '' : " (#{relative_time(Time.at(Time.now.to_f - queue_latency))})" %> </td>
|
|
19
21
|
<td class="delete-confirm">
|
|
20
|
-
<form action="<%=root_path %>queues/<%= queue.name %>" method="post">
|
|
22
|
+
<form action="<%=root_path %>queues/<%= CGI.escape(queue.name) %>" method="post">
|
|
21
23
|
<%= csrf_tag %>
|
|
22
24
|
<input class="btn btn-danger btn-xs" type="submit" name="delete" value="<%= t('Delete') %>" data-confirm="<%= t('AreYouSureDeleteQueue', :queue => h(queue.name)) %>" />
|
|
25
|
+
|
|
26
|
+
<% if Sidekiq.pro? %>
|
|
27
|
+
<% if queue.paused? %>
|
|
28
|
+
<input class="btn btn-danger btn-xs" type="submit" name="unpause" value="<%= t('Unpause') %>" />
|
|
29
|
+
<% else %>
|
|
30
|
+
<input class="btn btn-danger btn-xs" type="submit" name="pause" value="<%= t('Pause') %>" />
|
|
31
|
+
<% end %>
|
|
32
|
+
<% end %>
|
|
23
33
|
</form>
|
|
24
34
|
</td>
|
|
25
35
|
</tr>
|
data/web/views/retries.erb
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<form action="<%= root_path %>retries" method="post">
|
|
15
15
|
<%= csrf_tag %>
|
|
16
16
|
<div class="table_container">
|
|
17
|
-
<table class="table table-striped table-bordered
|
|
17
|
+
<table class="table table-striped table-bordered">
|
|
18
18
|
<thead>
|
|
19
19
|
<tr>
|
|
20
20
|
<th class="table-checkbox checkbox-column">
|
|
@@ -44,7 +44,10 @@
|
|
|
44
44
|
<td>
|
|
45
45
|
<a href="<%= root_path %>queues/<%= entry.queue %>"><%= entry.queue %></a>
|
|
46
46
|
</td>
|
|
47
|
-
<td
|
|
47
|
+
<td>
|
|
48
|
+
<%= entry.display_class %>
|
|
49
|
+
<%= display_tags(entry, "retries") %>
|
|
50
|
+
</td>
|
|
48
51
|
<td>
|
|
49
52
|
<div class="args"><%= display_args(entry.display_args) %></div>
|
|
50
53
|
</td>
|
|
@@ -55,19 +58,25 @@
|
|
|
55
58
|
<% end %>
|
|
56
59
|
</table>
|
|
57
60
|
</div>
|
|
58
|
-
<input class="btn btn-primary btn-xs pull-left" type="submit" name="retry" value="<%= t('RetryNow') %>" />
|
|
59
|
-
<input class="btn btn-danger btn-xs pull-left" type="submit" name="delete" value="<%= t('Delete') %>" />
|
|
60
|
-
<input class="btn btn-danger btn-xs pull-left" type="submit" name="kill" value="<%= t('Kill') %>" />
|
|
61
|
+
<input class="btn btn-primary btn-xs pull-left flip" type="submit" name="retry" value="<%= t('RetryNow') %>" />
|
|
62
|
+
<input class="btn btn-danger btn-xs pull-left flip" type="submit" name="delete" value="<%= t('Delete') %>" />
|
|
63
|
+
<input class="btn btn-danger btn-xs pull-left flip" type="submit" name="kill" value="<%= t('Kill') %>" />
|
|
61
64
|
</form>
|
|
62
65
|
|
|
63
|
-
|
|
64
|
-
<%=
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
<%=
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
<% unfiltered? do %>
|
|
67
|
+
<form action="<%= root_path %>retries/all/delete" method="post">
|
|
68
|
+
<%= csrf_tag %>
|
|
69
|
+
<input class="btn btn-danger btn-xs pull-right flip" type="submit" name="delete" value="<%= t('DeleteAll') %>" data-confirm="<%= t('AreYouSure') %>" />
|
|
70
|
+
</form>
|
|
71
|
+
<form action="<%= root_path %>retries/all/retry" method="post">
|
|
72
|
+
<%= csrf_tag %>
|
|
73
|
+
<input class="btn btn-danger btn-xs pull-right flip" type="submit" name="retry" value="<%= t('RetryAll') %>" data-confirm="<%= t('AreYouSure') %>" />
|
|
74
|
+
</form>
|
|
75
|
+
<form action="<%= root_path %>retries/all/kill" method="post">
|
|
76
|
+
<%= csrf_tag %>
|
|
77
|
+
<input class="btn btn-danger btn-xs pull-right flip" type="submit" name="kill" value="<%= t('KillAll') %>" data-confirm="<%= t('AreYouSure') %>" />
|
|
78
|
+
</form>
|
|
79
|
+
<% end %>
|
|
71
80
|
|
|
72
81
|
<% else %>
|
|
73
82
|
<div class="alert alert-success"><%= t('NoRetriesFound') %></div>
|
data/web/views/retry.erb
CHANGED
|
@@ -7,18 +7,18 @@
|
|
|
7
7
|
<tr>
|
|
8
8
|
<th><%= t('ErrorClass') %></th>
|
|
9
9
|
<td>
|
|
10
|
-
<code><%= h @retry
|
|
10
|
+
<code><%= h @retry['error_class'] %></code>
|
|
11
11
|
</td>
|
|
12
12
|
</tr>
|
|
13
13
|
<tr>
|
|
14
14
|
<th><%= t('ErrorMessage') %></th>
|
|
15
15
|
<td><%= h(@retry['error_message']) %></td>
|
|
16
16
|
</tr>
|
|
17
|
-
<% if
|
|
17
|
+
<% if @retry.error_backtrace %>
|
|
18
18
|
<tr>
|
|
19
19
|
<th><%= t('ErrorBacktrace') %></th>
|
|
20
20
|
<td>
|
|
21
|
-
<code><%= @retry
|
|
21
|
+
<code><%= @retry.error_backtrace.join("<br/>") %></code>
|
|
22
22
|
</td>
|
|
23
23
|
</tr>
|
|
24
24
|
<% end %>
|
data/web/views/scheduled.erb
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<form action="<%= root_path %>scheduled" method="post">
|
|
16
16
|
<%= csrf_tag %>
|
|
17
17
|
<div class="table_container">
|
|
18
|
-
<table class="table table-striped table-bordered
|
|
18
|
+
<table class="table table-striped table-bordered">
|
|
19
19
|
<thead>
|
|
20
20
|
<tr>
|
|
21
21
|
<th class="checkbox-column">
|
|
@@ -38,7 +38,10 @@
|
|
|
38
38
|
<td>
|
|
39
39
|
<a href="<%= root_path %>queues/<%= entry.queue %>"><%= entry.queue %></a>
|
|
40
40
|
</td>
|
|
41
|
-
<td
|
|
41
|
+
<td>
|
|
42
|
+
<%= entry.display_class %>
|
|
43
|
+
<%= display_tags(entry, "scheduled") %>
|
|
44
|
+
</td>
|
|
42
45
|
<td>
|
|
43
46
|
<div class="args"><%= display_args(entry.display_args) %></div>
|
|
44
47
|
</td>
|
|
@@ -46,8 +49,8 @@
|
|
|
46
49
|
<% end %>
|
|
47
50
|
</table>
|
|
48
51
|
</div>
|
|
49
|
-
<input class="btn btn-danger pull-right" type="submit" name="delete" value="<%= t('Delete') %>" />
|
|
50
|
-
<input class="btn btn-danger pull-right" type="submit" name="add_to_queue" value="<%= t('AddToQueue') %>" />
|
|
52
|
+
<input class="btn btn-danger pull-right flip" type="submit" name="delete" value="<%= t('Delete') %>" />
|
|
53
|
+
<input class="btn btn-danger pull-right flip" type="submit" name="add_to_queue" value="<%= t('AddToQueue') %>" />
|
|
51
54
|
</form>
|
|
52
55
|
<% else %>
|
|
53
56
|
<div class="alert alert-success"><%= t('NoScheduledFound') %></div>
|