sidekiq 2.13.0 → 2.13.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 (72) hide show
  1. data/.gitignore +2 -0
  2. data/Changes.md +21 -0
  3. data/Contributing.md +26 -0
  4. data/Pro-Changes.md +22 -0
  5. data/lib/sidekiq/exception_handler.rb +1 -1
  6. data/lib/sidekiq/middleware/chain.rb +8 -1
  7. data/lib/sidekiq/middleware/server/retry_jobs.rb +14 -1
  8. data/lib/sidekiq/redis_connection.rb +14 -5
  9. data/lib/sidekiq/version.rb +1 -1
  10. data/lib/sidekiq/web.rb +33 -11
  11. data/test/test_exception_handler.rb +3 -7
  12. data/test/test_middleware.rb +9 -2
  13. data/test/test_redis_connection.rb +30 -0
  14. data/test/test_retry.rb +17 -0
  15. data/test/test_web.rb +41 -3
  16. data/web/assets/javascripts/dashboard.js +36 -3
  17. data/web/assets/javascripts/locales/README.md +27 -0
  18. data/web/assets/javascripts/locales/jquery.timeago.ar.js +96 -0
  19. data/web/assets/javascripts/locales/jquery.timeago.bg.js +18 -0
  20. data/web/assets/javascripts/locales/jquery.timeago.bs.js +49 -0
  21. data/web/assets/javascripts/locales/jquery.timeago.ca.js +18 -0
  22. data/web/assets/javascripts/locales/jquery.timeago.cy.js +20 -0
  23. data/web/assets/javascripts/locales/jquery.timeago.cz.js +18 -0
  24. data/web/assets/javascripts/locales/jquery.timeago.da.js +18 -0
  25. data/web/assets/javascripts/locales/jquery.timeago.de.js +18 -0
  26. data/web/assets/javascripts/locales/jquery.timeago.el.js +18 -0
  27. data/web/assets/javascripts/locales/jquery.timeago.en-short.js +20 -0
  28. data/web/assets/javascripts/locales/jquery.timeago.en.js +20 -0
  29. data/web/assets/javascripts/locales/jquery.timeago.es.js +18 -0
  30. data/web/assets/javascripts/locales/jquery.timeago.et.js +18 -0
  31. data/web/assets/javascripts/locales/jquery.timeago.fa.js +22 -0
  32. data/web/assets/javascripts/locales/jquery.timeago.fi.js +28 -0
  33. data/web/assets/javascripts/locales/jquery.timeago.fr-short.js +16 -0
  34. data/web/assets/javascripts/locales/jquery.timeago.fr.js +17 -0
  35. data/web/assets/javascripts/locales/jquery.timeago.he.js +18 -0
  36. data/web/assets/javascripts/locales/jquery.timeago.hr.js +49 -0
  37. data/web/assets/javascripts/locales/jquery.timeago.hu.js +18 -0
  38. data/web/assets/javascripts/locales/jquery.timeago.hy.js +18 -0
  39. data/web/assets/javascripts/locales/jquery.timeago.id.js +18 -0
  40. data/web/assets/javascripts/locales/jquery.timeago.it.js +16 -0
  41. data/web/assets/javascripts/locales/jquery.timeago.ja.js +19 -0
  42. data/web/assets/javascripts/locales/jquery.timeago.ko.js +17 -0
  43. data/web/assets/javascripts/locales/jquery.timeago.lt.js +20 -0
  44. data/web/assets/javascripts/locales/jquery.timeago.mk.js +20 -0
  45. data/web/assets/javascripts/locales/jquery.timeago.nl.js +20 -0
  46. data/web/assets/javascripts/locales/jquery.timeago.no.js +18 -0
  47. data/web/assets/javascripts/locales/jquery.timeago.pl.js +31 -0
  48. data/web/assets/javascripts/locales/jquery.timeago.pt-br.js +16 -0
  49. data/web/assets/javascripts/locales/jquery.timeago.pt.js +16 -0
  50. data/web/assets/javascripts/locales/jquery.timeago.ro.js +18 -0
  51. data/web/assets/javascripts/locales/jquery.timeago.rs.js +49 -0
  52. data/web/assets/javascripts/locales/jquery.timeago.ru.js +34 -0
  53. data/web/assets/javascripts/locales/jquery.timeago.sk.js +18 -0
  54. data/web/assets/javascripts/locales/jquery.timeago.sl.js +44 -0
  55. data/web/assets/javascripts/locales/jquery.timeago.sv.js +18 -0
  56. data/web/assets/javascripts/locales/jquery.timeago.th.js +20 -0
  57. data/web/assets/javascripts/locales/jquery.timeago.tr.js +16 -0
  58. data/web/assets/javascripts/locales/jquery.timeago.uk.js +34 -0
  59. data/web/assets/javascripts/locales/jquery.timeago.uz.js +19 -0
  60. data/web/assets/javascripts/locales/jquery.timeago.zh-CN.js +20 -0
  61. data/web/assets/javascripts/locales/jquery.timeago.zh-TW.js +20 -0
  62. data/web/assets/stylesheets/application.css +46 -1
  63. data/web/views/_job_info.slim +51 -0
  64. data/web/views/_summary.slim +8 -8
  65. data/web/views/index.slim +1 -1
  66. data/web/views/layout.slim +24 -22
  67. data/web/views/queue.slim +1 -1
  68. data/web/views/retries.slim +2 -1
  69. data/web/views/retry.slim +1 -44
  70. data/web/views/scheduled.slim +4 -2
  71. data/web/views/scheduled_job_info.slim +6 -0
  72. metadata +50 -2
@@ -0,0 +1,49 @@
1
+ // Serbian
2
+ (function () {
3
+ var numpf;
4
+
5
+ numpf = function (n, f, s, t) {
6
+ var n10;
7
+ n10 = n % 10;
8
+ if (n10 === 1 && (n === 1 || n > 20)) {
9
+ return f;
10
+ } else if (n10 > 1 && n10 < 5 && (n > 20 || n < 10)) {
11
+ return s;
12
+ } else {
13
+ return t;
14
+ }
15
+ };
16
+
17
+ jQuery.timeago.settings.strings = {
18
+ prefixAgo: "pre",
19
+ prefixFromNow: "za",
20
+ suffixAgo: null,
21
+ suffixFromNow: null,
22
+ second: "sekund",
23
+ seconds: function (value) {
24
+ return numpf(value, "%d sekund", "%d sekunde", "%d sekundi");
25
+ },
26
+ minute: "oko minut",
27
+ minutes: function (value) {
28
+ return numpf(value, "%d minut", "%d minuta", "%d minuta");
29
+ },
30
+ hour: "oko jedan sat",
31
+ hours: function (value) {
32
+ return numpf(value, "%d sat", "%d sata", "%d sati");
33
+ },
34
+ day: "jedan dan",
35
+ days: function (value) {
36
+ return numpf(value, "%d dan", "%d dana", "%d dana");
37
+ },
38
+ month: "mesec dana",
39
+ months: function (value) {
40
+ return numpf(value, "%d mesec", "%d meseca", "%d meseci");
41
+ },
42
+ year: "pre godinu dana",
43
+ years: function (value) {
44
+ return numpf(value, "%d godinu", "%d godine", "%d godina");
45
+ },
46
+ wordSeparator: " "
47
+ };
48
+
49
+ }).call(this);
@@ -0,0 +1,34 @@
1
+ // Russian
2
+ (function() {
3
+ function numpf(n, f, s, t) {
4
+ // f - 1, 21, 31, ...
5
+ // s - 2-4, 22-24, 32-34 ...
6
+ // t - 5-20, 25-30, ...
7
+ var n10 = n % 10;
8
+ if ( (n10 == 1) && ( (n == 1) || (n > 20) ) ) {
9
+ return f;
10
+ } else if ( (n10 > 1) && (n10 < 5) && ( (n > 20) || (n < 10) ) ) {
11
+ return s;
12
+ } else {
13
+ return t;
14
+ }
15
+ }
16
+
17
+ jQuery.timeago.settings.strings = {
18
+ prefixAgo: null,
19
+ prefixFromNow: "через",
20
+ suffixAgo: "назад",
21
+ suffixFromNow: null,
22
+ seconds: "меньше минуты",
23
+ minute: "минуту",
24
+ minutes: function(value) { return numpf(value, "%d минута", "%d минуты", "%d минут"); },
25
+ hour: "час",
26
+ hours: function(value) { return numpf(value, "%d час", "%d часа", "%d часов"); },
27
+ day: "день",
28
+ days: function(value) { return numpf(value, "%d день", "%d дня", "%d дней"); },
29
+ month: "месяц",
30
+ months: function(value) { return numpf(value, "%d месяц", "%d месяца", "%d месяцев"); },
31
+ year: "год",
32
+ years: function(value) { return numpf(value, "%d год", "%d года", "%d лет"); }
33
+ };
34
+ })();
@@ -0,0 +1,18 @@
1
+ // Slovak
2
+ jQuery.timeago.settings.strings = {
3
+ prefixAgo: "pred",
4
+ prefixFromNow: null,
5
+ suffixAgo: null,
6
+ suffixFromNow: null,
7
+ seconds: "menej než minútou",
8
+ minute: "minútou",
9
+ minutes: "%d minútami",
10
+ hour: "hodinou",
11
+ hours: "%d hodinami",
12
+ day: "1 dňom",
13
+ days: "%d dňami",
14
+ month: "1 mesiacom",
15
+ months: "%d mesiacmi",
16
+ year: "1 rokom",
17
+ years: "%d rokmi"
18
+ };
@@ -0,0 +1,44 @@
1
+ // Slovenian with support for dual
2
+ (function () {
3
+ var numpf;
4
+ numpf = function (n, d, m) {
5
+ if (n == 2) {
6
+ return d;
7
+ } else {
8
+ return m;
9
+ }
10
+ };
11
+
12
+ jQuery.timeago.settings.strings = {
13
+ prefixAgo: "pred",
14
+ prefixFromNow: "čez",
15
+ suffixAgo: null,
16
+ suffixFromNow: null,
17
+ second: "sekundo",
18
+ seconds: function (value) {
19
+ return numpf(value, "%d sekundama", "%d sekundami");
20
+ },
21
+ minute: "minuto",
22
+ minutes: function (value) {
23
+ return numpf(value, "%d minutama", "%d minutami");
24
+ },
25
+ hour: "uro",
26
+ hours: function (value) {
27
+ return numpf(value, "%d urama", "%d urami");
28
+ },
29
+ day: "dnevom",
30
+ days: function (value) {
31
+ return numpf(value, "%d dnevi", "%d dnevi");
32
+ },
33
+ month: "enim mescem",
34
+ months: function (value) {
35
+ return numpf(value, "%d mesecema", "%d meseci");
36
+ },
37
+ year: "enim letom",
38
+ years: function (value) {
39
+ return numpf(value, "%d letoma", "%d leti");
40
+ },
41
+ wordSeparator: " "
42
+ };
43
+
44
+ }).call(this);
@@ -0,0 +1,18 @@
1
+ // Swedish
2
+ jQuery.timeago.settings.strings = {
3
+ prefixAgo: "för",
4
+ prefixFromNow: "om",
5
+ suffixAgo: "sedan",
6
+ suffixFromNow: "",
7
+ seconds: "mindre än en minut",
8
+ minute: "ungefär en minut",
9
+ minutes: "%d minuter",
10
+ hour: "ungefär en timme",
11
+ hours: "ungefär %d timmar",
12
+ day: "en dag",
13
+ days: "%d dagar",
14
+ month: "ungefär en månad",
15
+ months: "%d månader",
16
+ year: "ungefär ett år",
17
+ years: "%d år"
18
+ };
@@ -0,0 +1,20 @@
1
+ // Thai
2
+ jQuery.timeago.settings.strings = {
3
+ prefixAgo: null,
4
+ prefixFromNow: null,
5
+ suffixAgo: "ที่แล้ว",
6
+ suffixFromNow: "จากตอนนี้",
7
+ seconds: "น้อยกว่าหนึ่งนาที",
8
+ minute: "ประมาณหนึ่งนาที",
9
+ minutes: "%d นาที",
10
+ hour: "ประมาณหนึ่งชั่วโมง",
11
+ hours: "ประมาณ %d ชั่วโมง",
12
+ day: "หนึ่งวัน",
13
+ days: "%d วัน",
14
+ month: "ประมาณหนึ่งเดือน",
15
+ months: "%d เดือน",
16
+ year: "ประมาณหนึ่งปี",
17
+ years: "%d ปี",
18
+ wordSeparator: "",
19
+ numbers: []
20
+ };
@@ -0,0 +1,16 @@
1
+ // Turkish
2
+ jQuery.extend($.timeago.settings.strings, {
3
+ suffixAgo: 'önce',
4
+ suffixFromNow: null,
5
+ seconds: '1 dakikadan',
6
+ minute: '1 dakika',
7
+ minutes: '%d dakika',
8
+ hour: '1 saat',
9
+ hours: '%d saat',
10
+ day: '1 gün',
11
+ days: '%d gün',
12
+ month: '1 ay',
13
+ months: '%d ay',
14
+ year: '1 yıl',
15
+ years: '%d yıl'
16
+ });
@@ -0,0 +1,34 @@
1
+ // Ukrainian
2
+ (function() {
3
+ function numpf(n, f, s, t) {
4
+ // f - 1, 21, 31, ...
5
+ // s - 2-4, 22-24, 32-34 ...
6
+ // t - 5-20, 25-30, ...
7
+ var n10 = n % 10;
8
+ if ( (n10 == 1) && ( (n == 1) || (n > 20) ) ) {
9
+ return f;
10
+ } else if ( (n10 > 1) && (n10 < 5) && ( (n > 20) || (n < 10) ) ) {
11
+ return s;
12
+ } else {
13
+ return t;
14
+ }
15
+ }
16
+
17
+ jQuery.timeago.settings.strings = {
18
+ prefixAgo: null,
19
+ prefixFromNow: "через",
20
+ suffixAgo: "тому",
21
+ suffixFromNow: null,
22
+ seconds: "менше хвилини",
23
+ minute: "хвилина",
24
+ minutes: function(value) { return numpf(value, "%d хвилина", "%d хвилини", "%d хвилин"); },
25
+ hour: "година",
26
+ hours: function(value) { return numpf(value, "%d година", "%d години", "%d годин"); },
27
+ day: "день",
28
+ days: function(value) { return numpf(value, "%d день", "%d дні", "%d днів"); },
29
+ month: "місяць",
30
+ months: function(value) { return numpf(value, "%d місяць", "%d місяці", "%d місяців"); },
31
+ year: "рік",
32
+ years: function(value) { return numpf(value, "%d рік", "%d роки", "%d років"); }
33
+ };
34
+ })();
@@ -0,0 +1,19 @@
1
+ //Uzbek
2
+ jQuery.timeago.settings.strings = {
3
+ prefixAgo: null,
4
+ prefixFromNow: "keyin",
5
+ suffixAgo: "avval",
6
+ suffixFromNow: null,
7
+ seconds: "bir necha soniya",
8
+ minute: "1 daqiqa",
9
+ minutes: function(value) { return "%d daqiqa" },
10
+ hour: "1 soat",
11
+ hours: function(value) { return "%d soat" },
12
+ day: "1 kun",
13
+ days: function(value) { return "%d kun" },
14
+ month: "1 oy",
15
+ months: function(value) { return "%d oy" },
16
+ year: "1 yil",
17
+ years: function(value) { return "%d yil" },
18
+ wordSeparator: " "
19
+ };
@@ -0,0 +1,20 @@
1
+ // Simplified Chinese
2
+ jQuery.timeago.settings.strings = {
3
+ prefixAgo: null,
4
+ prefixFromNow: "从现在开始",
5
+ suffixAgo: "之前",
6
+ suffixFromNow: null,
7
+ seconds: "不到 1 分钟",
8
+ minute: "大约 1 分钟",
9
+ minutes: "%d 分钟",
10
+ hour: "大约 1 小时",
11
+ hours: "大约 %d 小时",
12
+ day: "1 天",
13
+ days: "%d 天",
14
+ month: "大约 1 个月",
15
+ months: "%d 月",
16
+ year: "大约 1 年",
17
+ years: "%d 年",
18
+ numbers: [],
19
+ wordSeparator: ""
20
+ };
@@ -0,0 +1,20 @@
1
+ // Traditional Chinese, zh-tw
2
+ jQuery.timeago.settings.strings = {
3
+ prefixAgo: null,
4
+ prefixFromNow: "從現在開始",
5
+ suffixAgo: "之前",
6
+ suffixFromNow: null,
7
+ seconds: "不到 1 分鐘",
8
+ minute: "大約 1 分鐘",
9
+ minutes: "%d 分鐘",
10
+ hour: "大約 1 小時",
11
+ hours: "%d 小時",
12
+ day: "大約 1 天",
13
+ days: "%d 天",
14
+ month: "大約 1 個月",
15
+ months: "%d 個月",
16
+ year: "大約 1 年",
17
+ years: "%d 年",
18
+ numbers: [],
19
+ wordSeparator: ""
20
+ };
@@ -90,6 +90,10 @@ header.row .pagination {
90
90
  margin: 12px 0;
91
91
  }
92
92
 
93
+ .summary_bar .actions {
94
+ padding: 10px 0px;
95
+ }
96
+
93
97
  .summary_bar .status {
94
98
  margin-left: 10px;
95
99
  }
@@ -126,16 +130,49 @@ header.row .pagination {
126
130
  }
127
131
  .summary_bar ul li {
128
132
  padding: 4px 0 2px 0;
133
+ text-align: center;
134
+ }
135
+ @media (max-width: 767px) and (min-width: 400px) {
136
+ .summary_bar ul li span {
137
+ width: 50% !important;
138
+ }
139
+ .summary_bar ul .desc {
140
+ text-align: left;
141
+ }
142
+ .summary_bar ul .count {
143
+ text-align: right;
144
+ }
145
+ }
146
+ @media (max-width: 979px) and (min-width: 768px) {
147
+ .summary_bar ul li.span2 {
148
+ margin: 0px 10px;
149
+ width: 96px !important;
150
+ }
151
+ }
152
+ @media (max-width: 1199px) and (min-width: 980px) {
153
+ .summary_bar ul li.span2 {
154
+ width: 130px !important;
155
+ }
156
+ }
157
+ @media (min-width: 1200px) {
158
+ .summary_bar ul li.span2 {
159
+ width: 154px !important;
160
+ }
129
161
  }
130
162
  .summary_bar ul .desc {
163
+ display: block;
131
164
  font-size: 1em;
132
165
  font-weight: normal;
166
+ width: 100%;
133
167
  }
134
168
  .summary_bar ul .count {
135
169
  color: #b1003e;
170
+ display: block;
136
171
  font-size: 1em;
137
172
  font-weight: bold;
138
173
  float: right;
174
+ padding: 0px 0px 2px 0px;
175
+ width: 100%;
139
176
  }
140
177
 
141
178
  table.table-white {
@@ -807,4 +844,12 @@ img.smallogo {
807
844
  .rickshaw_legend li:active {
808
845
  background: rgba(255, 255, 255, 0.2);
809
846
  border-radius: 3px;
810
- }
847
+ }
848
+ .args {
849
+ overflow: scroll;
850
+ max-height: 100px;
851
+ }
852
+ .args-extended {
853
+ overflow: scroll;
854
+ max-height: 500px;
855
+ }
@@ -0,0 +1,51 @@
1
+ header
2
+ h3 = t('Job')
3
+
4
+ table class="table table-bordered table-striped"
5
+ tbody
6
+ tr
7
+ th = t('Queue')
8
+ td
9
+ a href="#{root_path}queues/#{job['queue']}" #{job['queue']}
10
+ tr
11
+ th = t('Class')
12
+ td
13
+ code= job['class']
14
+ tr
15
+ th = t('Arguments')
16
+ td
17
+ code
18
+ // We don't want to truncate any job arguments when viewing a single job's status page
19
+ div.args-extended=display_args(job['args'], nil)
20
+ tr
21
+ th JID
22
+ td
23
+ code= job.jid
24
+ tr
25
+ th = t('Enqueued')
26
+ td== relative_time(job.enqueued_at)
27
+ - unless retry_extra_items(job).empty?
28
+ tr
29
+ th = t('Extras')
30
+ td
31
+ code
32
+ = retry_extra_items(job).inspect
33
+ - if type == :retry
34
+ - if job['retry_count'] && job['retry_count'] > 0
35
+ tr
36
+ th = t('RetryCount')
37
+ td= job['retry_count']
38
+ tr
39
+ th = t('LastRetry')
40
+ td== relative_time(job['retried_at'].is_a?(Numeric) ? Time.at(job['retried_at']) : Time.parse(job['retried_at']))
41
+ - else
42
+ tr
43
+ th = t('OriginallyFailed')
44
+ td== relative_time(job['failed_at'].is_a?(Numeric) ? Time.at(job['failed_at']) : Time.parse(job['failed_at']))
45
+ tr
46
+ th = t('NextRetry')
47
+ td== relative_time(job.at)
48
+ - if type == :scheduled
49
+ tr
50
+ th = t('Scheduled')
51
+ td== relative_time(job.at)
@@ -1,19 +1,19 @@
1
- ul.unstyled.summary
2
- li.processed
1
+ ul.unstyled.summary.row
2
+ li.processed.span2
3
3
  span.count #{number_with_delimiter(stats.processed)}
4
4
  span.desc = t('Processed')
5
- li.failed
5
+ li.failed.span2
6
6
  span.count #{number_with_delimiter(stats.failed)}
7
7
  span.desc = t('Failed')
8
- li.busy
9
- span.count #{number_with_delimiter(workers.size)}
8
+ li.busy.span2
9
+ span.count #{number_with_delimiter(workers_size)}
10
10
  span.desc = t('Busy')
11
- li.scheduled
11
+ li.scheduled.span2
12
12
  span.count #{number_with_delimiter(stats.scheduled_size)}
13
13
  span.desc = t('Scheduled')
14
- li.retries
14
+ li.retries.span2
15
15
  span.count #{number_with_delimiter(stats.retry_size)}
16
16
  span.desc = t('Retries')
17
- li.enqueued
17
+ li.enqueued.span2
18
18
  span.count #{number_with_delimiter(stats.enqueued)}
19
19
  span.desc = t('Enqueued')