sidekiq 6.1.0 → 6.2.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.

Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/Changes.md +64 -2
  3. data/README.md +1 -2
  4. data/lib/sidekiq.rb +1 -1
  5. data/lib/sidekiq/api.rb +27 -9
  6. data/lib/sidekiq/cli.rb +20 -12
  7. data/lib/sidekiq/client.rb +1 -5
  8. data/lib/sidekiq/extensions/action_mailer.rb +3 -2
  9. data/lib/sidekiq/extensions/active_record.rb +1 -1
  10. data/lib/sidekiq/fetch.rb +9 -3
  11. data/lib/sidekiq/job_retry.rb +1 -0
  12. data/lib/sidekiq/launcher.rb +58 -1
  13. data/lib/sidekiq/logger.rb +3 -2
  14. data/lib/sidekiq/manager.rb +1 -1
  15. data/lib/sidekiq/middleware/chain.rb +1 -1
  16. data/lib/sidekiq/util.rb +28 -0
  17. data/lib/sidekiq/version.rb +1 -1
  18. data/lib/sidekiq/web.rb +33 -78
  19. data/lib/sidekiq/web/action.rb +1 -1
  20. data/lib/sidekiq/web/application.rb +12 -6
  21. data/lib/sidekiq/web/csrf_protection.rb +30 -3
  22. data/lib/sidekiq/web/helpers.rb +23 -2
  23. data/lib/sidekiq/web/router.rb +4 -1
  24. data/sidekiq.gemspec +10 -2
  25. data/web/assets/images/apple-touch-icon.png +0 -0
  26. data/web/assets/javascripts/application.js +1 -6
  27. data/web/assets/stylesheets/application-dark.css +59 -32
  28. data/web/assets/stylesheets/application.css +19 -8
  29. data/web/locales/fr.yml +1 -1
  30. data/web/locales/ru.yml +4 -0
  31. data/web/views/busy.erb +47 -16
  32. data/web/views/layout.erb +1 -0
  33. data/web/views/morgue.erb +1 -1
  34. data/web/views/queue.erb +1 -1
  35. data/web/views/queues.erb +1 -1
  36. data/web/views/retries.erb +1 -1
  37. data/web/views/scheduled.erb +1 -1
  38. metadata +14 -29
  39. data/.circleci/config.yml +0 -71
  40. data/.github/contributing.md +0 -32
  41. data/.github/issue_template.md +0 -11
  42. data/.gitignore +0 -13
  43. data/.standard.yml +0 -20
  44. data/3.0-Upgrade.md +0 -70
  45. data/4.0-Upgrade.md +0 -53
  46. data/5.0-Upgrade.md +0 -56
  47. data/6.0-Upgrade.md +0 -72
  48. data/COMM-LICENSE +0 -97
  49. data/Ent-2.0-Upgrade.md +0 -37
  50. data/Ent-Changes.md +0 -269
  51. data/Gemfile +0 -24
  52. data/Gemfile.lock +0 -208
  53. data/Pro-2.0-Upgrade.md +0 -138
  54. data/Pro-3.0-Upgrade.md +0 -44
  55. data/Pro-4.0-Upgrade.md +0 -35
  56. data/Pro-5.0-Upgrade.md +0 -25
  57. data/Pro-Changes.md +0 -790
  58. data/Rakefile +0 -10
  59. data/code_of_conduct.md +0 -50
@@ -24,12 +24,7 @@ $(function() {
24
24
  }
25
25
 
26
26
  $(document).on('click', '.check_all', function() {
27
- var checked = $(this).attr('checked');
28
- if (checked == 'checked') {
29
- $('input[type=checkbox]', $(this).closest('table')).attr('checked', checked);
30
- } else {
31
- $('input[type=checkbox]', $(this).closest('table')).removeAttr('checked');
32
- }
27
+ $('input[type=checkbox]', $(this).closest('table')).prop('checked', this.checked);
33
28
  });
34
29
 
35
30
  $(document).on("click", "[data-confirm]", function() {
@@ -1,34 +1,44 @@
1
1
  html, body {
2
- background-color: #070707 !important;
3
- color: #ccc;
2
+ background-color: #333 !important;
3
+ color: #ddd;
4
4
  }
5
5
 
6
6
  a,
7
7
  .title,
8
8
  .summary_bar ul .count,
9
+ span.current-interval,
9
10
  .navbar .navbar-brand {
10
- color: #af0014;
11
+ color: #c04;
12
+ }
13
+
14
+ .history-graph + .active,
15
+ .beacon .dot {
16
+ background-color: #c04;
11
17
  }
12
18
 
13
19
  .navbar .navbar-brand:hover {
14
- color: #ccc;
20
+ color: #ddd;
15
21
  }
16
22
 
17
23
  .navbar .navbar-brand .status {
18
- color: #ccc;
24
+ color: #ddd;
25
+ }
26
+
27
+ .navbar-default .navbar-nav > li > a {
28
+ color: #ddd;
19
29
  }
20
30
 
21
31
  .navbar-inverse {
22
- background-color: #000;
23
- border-color: #333;
32
+ background-color: #222;
33
+ border-color: #555;
24
34
  }
25
35
 
26
- table.table-white {
27
- background-color: #111;
36
+ table {
37
+ background-color: #282828;
28
38
  }
29
39
 
30
40
  .table-striped > tbody > tr:nth-of-type(odd) {
31
- background-color: #222;
41
+ background-color: #333;
32
42
  }
33
43
 
34
44
  .table-bordered,
@@ -38,36 +48,42 @@ table.table-white {
38
48
  .table-bordered > tfoot > tr > th,
39
49
  .table-bordered > thead > tr > td,
40
50
  .table-bordered > thead > tr > th {
41
- border: 1px solid #333;
51
+ border: 1px solid #555;
42
52
  }
43
53
 
44
54
  .table-hover > tbody > tr:hover {
45
- background-color: #333;
55
+ background-color: #444;
46
56
  }
47
57
 
48
58
  .alert {
49
59
  border: none;
50
- color: #ccc;
60
+ color: #ddd;
51
61
  }
52
62
 
53
63
  .alert-success {
54
- background-color: #182d11;
64
+ background-color: #484;
55
65
  }
56
66
 
57
67
  a:link,
58
68
  a:active,
59
69
  a:hover,
60
70
  a:visited {
61
- color: #63798c;
71
+ color: #ddd;
62
72
  }
63
73
 
64
74
  a.btn {
65
75
  color: #000;
66
76
  }
67
77
 
78
+ input {
79
+ background-color: #444;
80
+ color: #ccc;
81
+ padding: 3px;
82
+ }
83
+
68
84
  .summary_bar .summary {
69
- background-color: #111;
70
- border: 1px solid #333;
85
+ background-color: #222;
86
+ border: 1px solid #555;
71
87
 
72
88
  -webkit-box-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
73
89
  -moz-box-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
@@ -75,27 +91,27 @@ a.btn {
75
91
  }
76
92
 
77
93
  .navbar-default {
78
- background-color: #000;
79
- border-color: #3d3d3d;
94
+ background-color: #222;
95
+ border-color: #555;
80
96
  }
81
97
 
82
98
  .navbar-default .navbar-nav > .active > a,
83
99
  .navbar-default .navbar-nav > .active > a:focus,
84
100
  .navbar-default .navbar-nav > .active > a:hover {
85
- color: #ccc;
86
- background-color: #282828;
101
+ color: #ddd;
102
+ background-color: #333;
87
103
  }
88
104
 
89
105
  .navbar-default .navbar-nav > li > a:hover {
90
- color: #ccc;
106
+ color: #ddd;
91
107
  }
92
108
 
93
109
  .pagination > li > a,
94
110
  .pagination > li > a:hover,
95
111
  .pagination > li > span {
96
- color: #ccc;
97
- background-color: #282828;
98
- border-color: #353535;
112
+ color: #ddd;
113
+ background-color: #333;
114
+ border-color: #555;
99
115
  }
100
116
  .pagination > .disabled > a,
101
117
  .pagination > .disabled > a:focus,
@@ -103,9 +119,9 @@ a.btn {
103
119
  .pagination > .disabled > span,
104
120
  .pagination > .disabled > span:focus,
105
121
  .pagination > .disabled > span:hover {
106
- color: #a5a5a5;
107
- background-color: #282828;
108
- border-color: #353535;
122
+ color: #ddd;
123
+ background-color: #333;
124
+ border-color: #555;
109
125
  }
110
126
 
111
127
  .stat {
@@ -113,11 +129,11 @@ a.btn {
113
129
  }
114
130
 
115
131
  #live-poll {
116
- color: #ccc;
132
+ color: #ddd;
117
133
  }
118
134
 
119
135
  .btn-warn {
120
- color: #333;
136
+ color: #444;
121
137
  }
122
138
 
123
139
  .rickshaw_graph .detail {
@@ -128,6 +144,17 @@ a.btn {
128
144
  }
129
145
 
130
146
  .rickshaw_graph .y_ticks.glow text {
131
- fill: #ccc;
132
- color: #ccc;
147
+ fill: #ddd;
148
+ color: #ddd;
149
+ }
150
+
151
+ .info-circle {
152
+ color: #282828;
153
+ background-color: #555555;
154
+ border-radius: 50%;
155
+ text-align: center;
156
+ vertical-align: middle;
157
+ padding: 3px 7px;
158
+ font-size: 0.7em;
159
+ margin-left: 5px;
133
160
  }
@@ -127,6 +127,10 @@ header.row .pagination {
127
127
  width: 14%;
128
128
  }
129
129
  @media (max-width: 767px) and (min-width: 200px) {
130
+ .summary_bar {
131
+ font-size: 1.5em;
132
+ }
133
+
130
134
  .summary_bar ul li {
131
135
  width: 100%;
132
136
  }
@@ -177,10 +181,6 @@ header.row .pagination {
177
181
  overflow: overlay;
178
182
  }
179
183
 
180
- table.table-white {
181
- background-color: #fff;
182
- }
183
-
184
184
  .queues form {
185
185
  margin: 0;
186
186
  }
@@ -190,7 +190,7 @@ form .btn {
190
190
  }
191
191
 
192
192
  form .btn-group .btn {
193
- margin-right: 1px;
193
+ margin-right: 4px;
194
194
  }
195
195
 
196
196
  td form {
@@ -442,7 +442,7 @@ img.smallogo {
442
442
  margin: 5px 10px 5px 5px;
443
443
  }
444
444
  .stat p{
445
- font-size: 1em;
445
+ font-size: 1.5em;
446
446
  margin: 5px 5px 5px 10px;
447
447
  }
448
448
  }
@@ -762,7 +762,7 @@ div.interval-slider input {
762
762
  font-family: Arial, sans-serif;
763
763
  border-radius: 3px;
764
764
  padding: 6px;
765
- opacity: .5;
765
+ opacity: .7;
766
766
  border: 1px solid #e0e0e0;
767
767
  font-size: 12px;
768
768
  position: absolute;
@@ -977,7 +977,7 @@ div.interval-slider input {
977
977
  }
978
978
  .rickshaw_graph .y_ticks text,
979
979
  .rickshaw_graph .x_ticks_d3 text {
980
- opacity: .5;
980
+ opacity: .7;
981
981
  font-size: 12px;
982
982
  pointer-events: none
983
983
  }
@@ -1156,3 +1156,14 @@ div.interval-slider input {
1156
1156
  .delete-confirm {
1157
1157
  width: 20%;
1158
1158
  }
1159
+
1160
+ .info-circle {
1161
+ color: #f3f3f3;
1162
+ background-color: #dddddd;
1163
+ border-radius: 50%;
1164
+ text-align: center;
1165
+ vertical-align: middle;
1166
+ padding: 3px 7px;
1167
+ font-size: 0.7em;
1168
+ margin-left: 5px;
1169
+ }
data/web/locales/fr.yml CHANGED
@@ -72,7 +72,7 @@ fr:
72
72
  Quiet: Clore
73
73
  StopAll: Tout arrêter
74
74
  QuietAll: Tout clore
75
- PollingInterval: Interval de rafraîchissement
75
+ PollingInterval: Intervalle de rafraîchissement
76
76
  Plugins: Plugins
77
77
  NotYetEnqueued: Pas encore en file d'attente
78
78
  CreatedAt: Créée le
data/web/locales/ru.yml CHANGED
@@ -38,6 +38,7 @@ ru:
38
38
  AreYouSure: Вы уверены?
39
39
  DeleteAll: Удалить все
40
40
  RetryAll: Повторить все
41
+ KillAll: Убить всё
41
42
  NoRetriesFound: Нет попыток
42
43
  Error: Ошибка
43
44
  ErrorClass: Класс ошибки
@@ -76,3 +77,6 @@ ru:
76
77
  NotYetEnqueued: Пока не в очереди
77
78
  CreatedAt: Создан
78
79
  BackToApp: Назад
80
+ Latency: Задержка
81
+ Pause: Пауза
82
+ Unpause: Возобновить
data/web/views/busy.erb CHANGED
@@ -1,8 +1,39 @@
1
1
  <div class="row header">
2
- <div class="col-sm-8 pull-left flip">
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-4 pull-right flip">
36
+ <div class="col-sm-3 pull-right flip">
6
37
  <form method="POST" class="warning-messages">
7
38
  <%= csrf_tag %>
8
39
  <div class="btn-group pull-right flip">
@@ -12,14 +43,14 @@
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 table-white">
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('Threads') %></th>
22
- <th><%= t('Busy') %></th>
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>&nbsp;</th>
24
55
  </thead>
25
56
  <% lead = processes.leader %>
@@ -42,19 +73,19 @@
42
73
  <%= process['queues'] * ", " %>
43
74
  </td>
44
75
  <td><%= relative_time(Time.at(process['started_at'])) %></td>
76
+ <td><%= format_memory(process['rss'].to_i) %></td>
45
77
  <td><%= process['concurrency'] %></td>
46
78
  <td><%= process['busy'] %></td>
47
79
  <td>
48
- <div class="btn-group pull-right flip">
49
- <form method="POST">
50
- <%= csrf_tag %>
51
- <input type="hidden" name="identity" value="<%= process['identity'] %>"/>
52
- <% unless process.stopping? %>
53
- <button class="btn btn-warn" type="submit" name="quiet" value="1"><%= t('Quiet') %></button>
54
- <% 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 %>
55
86
  <button class="btn btn-danger" type="submit" name="stop" value="1"><%= t('Stop') %></button>
56
- </form>
57
- </div>
87
+ </div>
88
+ </form>
58
89
  </td>
59
90
  </tr>
60
91
  <% end %>
@@ -68,7 +99,7 @@
68
99
  </div>
69
100
 
70
101
  <div class="table_container">
71
- <table class="workers table table-hover table-bordered table-striped table-white">
102
+ <table class="workers table table-hover table-bordered table-striped">
72
103
  <thead>
73
104
  <th><%= t('Process') %></th>
74
105
  <th><%= t('TID') %></th>
data/web/views/layout.erb CHANGED
@@ -16,6 +16,7 @@
16
16
  <link href="<%= root_path %>stylesheets/application-rtl.css" media="screen" rel="stylesheet" type="text/css" />
17
17
  <% end %>
18
18
 
19
+ <link rel="apple-touch-icon" href="<%= root_path %>images/apple-touch-icon.png">
19
20
  <link rel="shortcut icon" type="image/ico" href="<%= root_path %>images/favicon.ico" />
20
21
  <script type="text/javascript" src="<%= root_path %>javascripts/application.js"></script>
21
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 table-white">
17
+ <table class="table table-striped table-bordered">
18
18
  <thead>
19
19
  <tr>
20
20
  <th class="table-checkbox checkbox-column">
data/web/views/queue.erb CHANGED
@@ -52,4 +52,4 @@
52
52
  <% end %>
53
53
  </table>
54
54
  </div>
55
- <%= 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,7 +1,7 @@
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 table-white">
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>
@@ -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 table-white">
17
+ <table class="table table-striped table-bordered">
18
18
  <thead>
19
19
  <tr>
20
20
  <th class="table-checkbox checkbox-column">
@@ -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 table-white">
18
+ <table class="table table-striped table-bordered">
19
19
  <thead>
20
20
  <tr>
21
21
  <th class="checkbox-column">