sidekiq 3.5.4 → 5.2.7

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 (175) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +61 -0
  3. data/{Contributing.md → .github/contributing.md} +0 -0
  4. data/.github/issue_template.md +11 -0
  5. data/.gitignore +3 -0
  6. data/.travis.yml +5 -10
  7. data/4.0-Upgrade.md +53 -0
  8. data/5.0-Upgrade.md +56 -0
  9. data/COMM-LICENSE +13 -11
  10. data/Changes.md +376 -1
  11. data/Ent-Changes.md +201 -2
  12. data/Gemfile +14 -18
  13. data/LICENSE +1 -1
  14. data/Pro-3.0-Upgrade.md +44 -0
  15. data/Pro-4.0-Upgrade.md +35 -0
  16. data/Pro-Changes.md +307 -2
  17. data/README.md +34 -22
  18. data/Rakefile +3 -3
  19. data/bin/sidekiq +0 -1
  20. data/bin/sidekiqctl +13 -86
  21. data/bin/sidekiqload +23 -27
  22. data/code_of_conduct.md +50 -0
  23. data/lib/generators/sidekiq/templates/worker_spec.rb.erb +3 -3
  24. data/lib/generators/sidekiq/templates/worker_test.rb.erb +6 -6
  25. data/lib/sidekiq.rb +72 -25
  26. data/lib/sidekiq/api.rb +206 -73
  27. data/lib/sidekiq/cli.rb +145 -101
  28. data/lib/sidekiq/client.rb +42 -36
  29. data/lib/sidekiq/core_ext.rb +1 -105
  30. data/lib/sidekiq/ctl.rb +221 -0
  31. data/lib/sidekiq/delay.rb +42 -0
  32. data/lib/sidekiq/exception_handler.rb +4 -5
  33. data/lib/sidekiq/extensions/action_mailer.rb +1 -0
  34. data/lib/sidekiq/extensions/active_record.rb +1 -0
  35. data/lib/sidekiq/extensions/class_methods.rb +1 -0
  36. data/lib/sidekiq/extensions/generic_proxy.rb +8 -1
  37. data/lib/sidekiq/fetch.rb +36 -111
  38. data/lib/sidekiq/job_logger.rb +25 -0
  39. data/lib/sidekiq/job_retry.rb +262 -0
  40. data/lib/sidekiq/launcher.rb +129 -55
  41. data/lib/sidekiq/logging.rb +21 -3
  42. data/lib/sidekiq/manager.rb +83 -182
  43. data/lib/sidekiq/middleware/chain.rb +1 -0
  44. data/lib/sidekiq/middleware/i18n.rb +1 -0
  45. data/lib/sidekiq/middleware/server/active_record.rb +10 -0
  46. data/lib/sidekiq/paginator.rb +1 -0
  47. data/lib/sidekiq/processor.rb +221 -103
  48. data/lib/sidekiq/rails.rb +47 -27
  49. data/lib/sidekiq/redis_connection.rb +74 -7
  50. data/lib/sidekiq/scheduled.rb +87 -28
  51. data/lib/sidekiq/testing.rb +150 -19
  52. data/lib/sidekiq/testing/inline.rb +1 -0
  53. data/lib/sidekiq/util.rb +15 -17
  54. data/lib/sidekiq/version.rb +2 -1
  55. data/lib/sidekiq/web.rb +120 -184
  56. data/lib/sidekiq/web/action.rb +89 -0
  57. data/lib/sidekiq/web/application.rb +353 -0
  58. data/lib/sidekiq/{web_helpers.rb → web/helpers.rb} +123 -47
  59. data/lib/sidekiq/web/router.rb +100 -0
  60. data/lib/sidekiq/worker.rb +135 -18
  61. data/sidekiq.gemspec +8 -14
  62. data/web/assets/images/{status-sd8051fd480.png → status.png} +0 -0
  63. data/web/assets/javascripts/application.js +24 -20
  64. data/web/assets/javascripts/dashboard.js +33 -18
  65. data/web/assets/stylesheets/application-rtl.css +246 -0
  66. data/web/assets/stylesheets/application.css +401 -7
  67. data/web/assets/stylesheets/bootstrap-rtl.min.css +9 -0
  68. data/web/assets/stylesheets/bootstrap.css +4 -8
  69. data/web/locales/ar.yml +81 -0
  70. data/web/locales/cs.yml +11 -1
  71. data/web/locales/de.yml +1 -1
  72. data/web/locales/en.yml +4 -0
  73. data/web/locales/es.yml +4 -3
  74. data/web/locales/fa.yml +80 -0
  75. data/web/locales/fr.yml +21 -12
  76. data/web/locales/he.yml +79 -0
  77. data/web/locales/ja.yml +24 -13
  78. data/web/locales/ru.yml +3 -0
  79. data/web/locales/ur.yml +80 -0
  80. data/web/views/_footer.erb +7 -9
  81. data/web/views/_job_info.erb +5 -1
  82. data/web/views/_nav.erb +5 -19
  83. data/web/views/_paging.erb +1 -1
  84. data/web/views/busy.erb +18 -9
  85. data/web/views/dashboard.erb +5 -5
  86. data/web/views/dead.erb +1 -1
  87. data/web/views/layout.erb +13 -5
  88. data/web/views/morgue.erb +16 -12
  89. data/web/views/queue.erb +12 -11
  90. data/web/views/queues.erb +5 -3
  91. data/web/views/retries.erb +19 -13
  92. data/web/views/retry.erb +2 -2
  93. data/web/views/scheduled.erb +4 -4
  94. data/web/views/scheduled_job_info.erb +1 -1
  95. metadata +45 -227
  96. data/lib/sidekiq/actor.rb +0 -39
  97. data/lib/sidekiq/middleware/server/logging.rb +0 -40
  98. data/lib/sidekiq/middleware/server/retry_jobs.rb +0 -206
  99. data/test/config.yml +0 -9
  100. data/test/env_based_config.yml +0 -11
  101. data/test/fake_env.rb +0 -0
  102. data/test/fixtures/en.yml +0 -2
  103. data/test/helper.rb +0 -49
  104. data/test/test_api.rb +0 -493
  105. data/test/test_cli.rb +0 -335
  106. data/test/test_client.rb +0 -194
  107. data/test/test_exception_handler.rb +0 -55
  108. data/test/test_extensions.rb +0 -126
  109. data/test/test_fetch.rb +0 -104
  110. data/test/test_logging.rb +0 -34
  111. data/test/test_manager.rb +0 -168
  112. data/test/test_middleware.rb +0 -159
  113. data/test/test_processor.rb +0 -237
  114. data/test/test_rails.rb +0 -21
  115. data/test/test_redis_connection.rb +0 -126
  116. data/test/test_retry.rb +0 -325
  117. data/test/test_scheduled.rb +0 -114
  118. data/test/test_scheduling.rb +0 -49
  119. data/test/test_sidekiq.rb +0 -99
  120. data/test/test_testing.rb +0 -142
  121. data/test/test_testing_fake.rb +0 -268
  122. data/test/test_testing_inline.rb +0 -93
  123. data/test/test_util.rb +0 -16
  124. data/test/test_web.rb +0 -608
  125. data/test/test_web_helpers.rb +0 -53
  126. data/web/assets/images/bootstrap/glyphicons-halflings-white.png +0 -0
  127. data/web/assets/images/bootstrap/glyphicons-halflings.png +0 -0
  128. data/web/assets/images/status/active.png +0 -0
  129. data/web/assets/images/status/idle.png +0 -0
  130. data/web/assets/javascripts/locales/README.md +0 -27
  131. data/web/assets/javascripts/locales/jquery.timeago.ar.js +0 -96
  132. data/web/assets/javascripts/locales/jquery.timeago.bg.js +0 -18
  133. data/web/assets/javascripts/locales/jquery.timeago.bs.js +0 -49
  134. data/web/assets/javascripts/locales/jquery.timeago.ca.js +0 -18
  135. data/web/assets/javascripts/locales/jquery.timeago.cs.js +0 -18
  136. data/web/assets/javascripts/locales/jquery.timeago.cy.js +0 -20
  137. data/web/assets/javascripts/locales/jquery.timeago.da.js +0 -18
  138. data/web/assets/javascripts/locales/jquery.timeago.de.js +0 -18
  139. data/web/assets/javascripts/locales/jquery.timeago.el.js +0 -18
  140. data/web/assets/javascripts/locales/jquery.timeago.en-short.js +0 -20
  141. data/web/assets/javascripts/locales/jquery.timeago.en.js +0 -20
  142. data/web/assets/javascripts/locales/jquery.timeago.es.js +0 -18
  143. data/web/assets/javascripts/locales/jquery.timeago.et.js +0 -18
  144. data/web/assets/javascripts/locales/jquery.timeago.fa.js +0 -22
  145. data/web/assets/javascripts/locales/jquery.timeago.fi.js +0 -28
  146. data/web/assets/javascripts/locales/jquery.timeago.fr-short.js +0 -16
  147. data/web/assets/javascripts/locales/jquery.timeago.fr.js +0 -17
  148. data/web/assets/javascripts/locales/jquery.timeago.he.js +0 -18
  149. data/web/assets/javascripts/locales/jquery.timeago.hr.js +0 -49
  150. data/web/assets/javascripts/locales/jquery.timeago.hu.js +0 -18
  151. data/web/assets/javascripts/locales/jquery.timeago.hy.js +0 -18
  152. data/web/assets/javascripts/locales/jquery.timeago.id.js +0 -18
  153. data/web/assets/javascripts/locales/jquery.timeago.it.js +0 -16
  154. data/web/assets/javascripts/locales/jquery.timeago.ja.js +0 -19
  155. data/web/assets/javascripts/locales/jquery.timeago.ko.js +0 -17
  156. data/web/assets/javascripts/locales/jquery.timeago.lt.js +0 -20
  157. data/web/assets/javascripts/locales/jquery.timeago.mk.js +0 -20
  158. data/web/assets/javascripts/locales/jquery.timeago.nl.js +0 -20
  159. data/web/assets/javascripts/locales/jquery.timeago.no.js +0 -18
  160. data/web/assets/javascripts/locales/jquery.timeago.pl.js +0 -31
  161. data/web/assets/javascripts/locales/jquery.timeago.pt-br.js +0 -16
  162. data/web/assets/javascripts/locales/jquery.timeago.pt.js +0 -16
  163. data/web/assets/javascripts/locales/jquery.timeago.ro.js +0 -18
  164. data/web/assets/javascripts/locales/jquery.timeago.rs.js +0 -49
  165. data/web/assets/javascripts/locales/jquery.timeago.ru.js +0 -34
  166. data/web/assets/javascripts/locales/jquery.timeago.sk.js +0 -18
  167. data/web/assets/javascripts/locales/jquery.timeago.sl.js +0 -44
  168. data/web/assets/javascripts/locales/jquery.timeago.sv.js +0 -18
  169. data/web/assets/javascripts/locales/jquery.timeago.th.js +0 -20
  170. data/web/assets/javascripts/locales/jquery.timeago.tr.js +0 -16
  171. data/web/assets/javascripts/locales/jquery.timeago.uk.js +0 -34
  172. data/web/assets/javascripts/locales/jquery.timeago.uz.js +0 -19
  173. data/web/assets/javascripts/locales/jquery.timeago.zh-cn.js +0 -20
  174. data/web/assets/javascripts/locales/jquery.timeago.zh-tw.js +0 -20
  175. data/web/views/_poll_js.erb +0 -5
@@ -73,3 +73,6 @@ ru:
73
73
  QuietAll: Отдыхать всем
74
74
  PollingInterval: Интервал опроса
75
75
  Plugins: Плагины
76
+ NotYetEnqueued: Пока не в очереди
77
+ CreatedAt: Создан
78
+ BackToApp: Назад
@@ -0,0 +1,80 @@
1
+ # elements like %{queue} are variables and should not be translated
2
+ ur:
3
+ TextDirection: 'rtl'
4
+ Dashboard: صفحۂ اول
5
+ Status: اسٹیٹس
6
+ Time: ﻭﻗﺖ
7
+ Namespace: Namespace
8
+ Realtime: ﺑﺮاﮦ ﺭاﺳﺖ
9
+ History: ﺗﺎﺭﻳﺦ
10
+ Busy: مصروف
11
+ Processed: مکمل شدہ
12
+ Failed: ﻧﺎکاﻡ ﺷﺪﮦ
13
+ Scheduled: ﻁےﺷﺪﮦ
14
+ Retries: ﺩﻭﺑﺎﺭﮦ کﻭﺷﻴﺶ
15
+ Enqueued: قطار ميں شامل
16
+ Worker: ورکر
17
+ LivePoll: ﺑﺮاﮦ ﺭاﺳﺖ
18
+ StopPolling: ﺑﺮاﮦ ﺭاﺳﺖ روکيے
19
+ Queue: قطار
20
+ Class: کلاس
21
+ Job: جاب
22
+ Arguments: دلائل
23
+ Extras: اﺻﺎﻑی
24
+ Started: شروع
25
+ ShowAll: سارے دکھاو
26
+ CurrentMessagesInQueue: قطار ميں موجود تمام پيغامات <span class='title'>%{queue}</span>
27
+ AddToQueue: ﻗﻄﺎﺭ ميں شامل کريں
28
+ AreYouSureDeleteJob: کيا آپ یقین جاب حتم کرنا چاھتے ہيں ؟
29
+ AreYouSureDeleteQueue: کيا آپ یقین قطار حتم کرنا چاھتے ہيں ؟
30
+ Delete: ﺣﺬﻑ
31
+ Queues: قطاريں
32
+ Size: ﺣﺠﻢ
33
+ Actions: ﻋﻮاﻣﻞ
34
+ NextRetry: اگلی کﻭﺷﻴﺶ
35
+ RetryCount: دوبارہ کوشش کا مکمل شمار
36
+ RetryNow: ابھی دوبارہ کوشش
37
+ Kill: ختم کرديں
38
+ LastRetry: گزشتہ کوشش
39
+ OriginallyFailed: ابتادائ ناکامی
40
+ AreYouSure: کيا یقین ؟
41
+ DeleteAll: ﺗﻤﺎﻡ ﺣﺬﻑ کر ديں
42
+ RetryAll: ﺗﻤﺎﻡ کی ﺩﻭﺑﺎﺭﮦ کﻭﺷﻴﺶ کﺭيں
43
+ NoRetriesFound: کویٔ ﺩﻭﺑﺎﺭﮦ کﻭﺷﻴﺶ نھيں ملی
44
+ Error: مسئلہ
45
+ ErrorClass: مسئلہ کی کلاس
46
+ ErrorMessage: مسئلہ کی وجہ
47
+ ErrorBacktrace: مسئلہ کی کی تحقیقات کريں
48
+ GoBack: واپس جايں
49
+ NoScheduledFound: کویٔ ﻁےﺷﺪﮦچيز نہیں ملی
50
+ When: ﺏک
51
+ ScheduledJobs: ﻁےﺷﺪﮦجاب
52
+ idle: بیکار
53
+ active: فعال
54
+ Version: ورژن
55
+ Connections: کنکشنز
56
+ MemoryUsage: یاداشت کا استعمال
57
+ PeakMemoryUsage: سب سے زيادہ یاداشت کا استعمال
58
+ Uptime: اپ ٹائم
59
+ OneWeek: ایک ہفتہ
60
+ OneMonth: ایک مہینہ
61
+ ThreeMonths: تین ماہ
62
+ SixMonths: چھ ماہ
63
+ Failures: ناکامیاں
64
+ DeadJobs: ختم شدہ جاب
65
+ NoDeadJobsFound: کویٔ ختم شدہ جاب نہيی ملی
66
+ Dead: ختم شدہ
67
+ Processes: ﻋﻤﻠﻴﺎﺕ
68
+ Thread: موضوع
69
+ Threads: موضوع
70
+ Jobs: جابز
71
+ Paused: موقوف
72
+ Stop: بند کرو
73
+ Quiet: ﺣﺘﻢ کﺭﻭ
74
+ StopAll: ﺗﻤﺎﻡ ﺑﻨﺪ کﺭﻭ
75
+ QuietAll: ﺗﻤﺎﻡ ﺣﺘﻢ کﺭﻭ
76
+ PollingInterval: ﺑﺮاﮦ ﺭاﺳﺖ کا ﺩﻭﺭاﻧﻴﮧ
77
+ Plugins: پلگ انز
78
+ NotYetEnqueued: ﻗﺘﺎﺭميں شامل نھيں
79
+ CreatedAt: ﺗﺎﺭﻳﺢ آﻏﺎﺯ
80
+ BackToApp: ﻭاپﺱ صفحۂ اﻭﻝ پر
@@ -1,21 +1,19 @@
1
- <div class="navbar navbar-fixed-bottom navbar-inverse">
1
+ <div class="navbar navbar-fixed-bottom navbar-inverse ltr">
2
2
  <div class="navbar-inner">
3
3
  <div class="container text-center">
4
4
  <ul class="nav">
5
5
  <li>
6
- <p class="navbar-text" style="color:white;"><%= product_version %></p>
6
+ <p class="navbar-text product-version"><%= product_version %></p>
7
7
  </li>
8
8
  <li>
9
- <p class="navbar-text redis-url">Redis: <%= redis_connection %></p>
9
+ <p class="navbar-text redis-url" title="<%= redis_connection_and_namespace %>"><%= redis_connection_and_namespace %></p>
10
10
  </li>
11
11
  <li>
12
- <p class="navbar-text"><%= t('Time') %>: <%= Time.now.utc.strftime('%H:%M:%S UTC') %></p>
12
+ <p class="navbar-text server-utc-time"><%= server_utc_time %></p>
13
+ </li>
14
+ <li>
15
+ <p class="navbar-text"><a style="color: gray;" href="https://github.com/mperham/sidekiq/wiki">docs</a></p>
13
16
  </li>
14
- <% if namespace %>
15
- <li>
16
- <p class="navbar-text redis-namespace"><%= t('Namespace') %>: <%= namespace %></p>
17
- </li>
18
- <% end %>
19
17
  </ul>
20
18
  </div>
21
19
  </div>
@@ -32,6 +32,10 @@
32
32
  <code><%= job.jid %></code>
33
33
  </td>
34
34
  </tr>
35
+ <tr>
36
+ <th><%= t('CreatedAt') %></th>
37
+ <td><%= relative_time(job.created_at) %></td>
38
+ </tr>
35
39
  <tr>
36
40
  <th><%= t('Enqueued') %></th>
37
41
  <td><%= (enqueued_at = job.enqueued_at) ? relative_time(enqueued_at) : t('NotYetEnqueued') %></td>
@@ -76,7 +80,7 @@
76
80
  <% if type == :dead %>
77
81
  <tr>
78
82
  <th><%= t('LastRetry') %></th>
79
- <td><%= relative_time(job.at) %></td>
83
+ <td><%= relative_time(job.at) if job['retry_count'] %></td>
80
84
  </tr>
81
85
  <% end %>
82
86
  </tbody>
@@ -9,7 +9,7 @@
9
9
  <div class="navbar-toggle collapsed navbar-livereload">
10
10
  <%= erb :_poll_link %>
11
11
  <% if Sidekiq::Web.app_url %>
12
- <a class="btn btn-inverse" href="<%= Sidekiq::Web.app_url %>">Back to App</a>
12
+ <a class="btn btn-inverse" href="<%= Sidekiq::Web.app_url %>"><%= t('BackToApp') %></a>
13
13
  <% end %>
14
14
  </div>
15
15
  <a class="navbar-brand" href="<%= root_path %>">
@@ -32,31 +32,17 @@
32
32
  <% end %>
33
33
  <% end %>
34
34
 
35
- <li class="dropdown" data-navbar="dropdown">
36
- <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
37
- <%= t('Plugins') %> <span class="caret"></span>
38
- </a>
39
- <ul class="dropdown-menu" role="menu">
40
- <% Sidekiq::Web.custom_tabs.each do |title, url| %>
41
- <li>
42
- <a href="<%= root_path %><%= url %>"><%= t(title) %></a>
43
- </li>
44
- <% end %>
45
- </ul>
46
- </li>
47
-
48
35
  <% Sidekiq::Web.custom_tabs.each do |title, url| %>
49
36
  <li class="<%= current_path.start_with?(url) ? 'active' : '' %>" data-navbar="custom-tab">
50
37
  <a href="<%= root_path %><%= url %>"><%= t(title) %></a>
51
38
  </li>
52
39
  <% end %>
53
- </ul>
54
- <ul class="nav navbar-nav navbar-right navbar-livereload" data-navbar="static">
55
- <li>
56
- <div class="poll-wrapper pull-right">
40
+
41
+ <li class="navbar-livereload">
42
+ <div class="poll-wrapper">
57
43
  <%= erb :_poll_link %>
58
44
  <% if Sidekiq::Web.app_url %>
59
- <a class="btn btn-inverse" href="<%= Sidekiq::Web.app_url %>">Back to App</a>
45
+ <a class="btn btn-inverse" href="<%= Sidekiq::Web.app_url %>"><%= t('BackToApp') %></a>
60
46
  <% end %>
61
47
  </div>
62
48
  </li>
@@ -1,5 +1,5 @@
1
1
  <% if @total_size > @count %>
2
- <ul class="pagination pull-right">
2
+ <ul class="pagination pull-right flip">
3
3
  <li class="<%= 'disabled' if @current_page == 1 %>">
4
4
  <a href="<%= url %>?page=1">&laquo;</a>
5
5
  </li>
@@ -1,13 +1,13 @@
1
1
  <div class="row header">
2
- <div class="col-sm-8 pull-left">
2
+ <div class="col-sm-8 pull-left flip">
3
3
  <h3><%= t('Processes') %></h3>
4
4
  </div>
5
- <div class="col-sm-4 pull-right">
6
- <form method="POST" style="margin-top: 20px; margin-bottom: 10px;">
5
+ <div class="col-sm-4 pull-right flip">
6
+ <form method="POST" class="warning-messages">
7
7
  <%= csrf_tag %>
8
- <div class="btn-group pull-right">
9
- <button class="btn btn-warn" type="submit" name="quiet" value="1"><%= t('QuietAll') %></button>
10
- <button class="btn btn-danger" type="submit" name="stop" value="1"><%= t('StopAll') %></button>
8
+ <div class="btn-group pull-right flip">
9
+ <button class="btn btn-warn" type="submit" name="quiet" value="1" data-confirm="<%= t('AreYouSure') %>"><%= t('QuietAll') %></button>
10
+ <button class="btn btn-danger" type="submit" name="stop" value="1" data-confirm="<%= t('AreYouSure') %>"><%= t('StopAll') %></button>
11
11
  </div>
12
12
  </form>
13
13
  </div>
@@ -22,14 +22,21 @@
22
22
  <th><%= t('Busy') %></th>
23
23
  <th>&nbsp;</th>
24
24
  </thead>
25
+ <% lead = processes.leader %>
25
26
  <% processes.each do |process| %>
26
27
  <tr>
27
- <td width="50%">
28
+ <td class="box">
28
29
  <%= "#{process['hostname']}:#{process['pid']}" %>
29
30
  <span class="label label-success"><%= process.tag %></span>
30
31
  <% process.labels.each do |label| %>
31
32
  <span class="label label-info"><%= label %></span>
32
33
  <% end %>
34
+ <% if process.stopping? %>
35
+ <span class="label label-danger">quiet</span>
36
+ <% end %>
37
+ <% if process.identity == lead %>
38
+ <span class="label label-warning">leader</span>
39
+ <% end %>
33
40
  <br>
34
41
  <b><%= "#{t('Queues')}: " %></b>
35
42
  <%= process['queues'] * ", " %>
@@ -38,11 +45,13 @@
38
45
  <td><%= process['concurrency'] %></td>
39
46
  <td><%= process['busy'] %></td>
40
47
  <td>
41
- <div class="btn-group pull-right">
48
+ <div class="btn-group pull-right flip">
42
49
  <form method="POST">
43
50
  <%= csrf_tag %>
44
51
  <input type="hidden" name="identity" value="<%= process['identity'] %>"/>
45
- <button class="btn btn-warn" type="submit" name="quiet" value="1"><%= t('Quiet') %></button>
52
+ <% unless process.stopping? %>
53
+ <button class="btn btn-warn" type="submit" name="quiet" value="1"><%= t('Quiet') %></button>
54
+ <% end %>
46
55
  <button class="btn btn-danger" type="submit" name="stop" value="1"><%= t('Stop') %></button>
47
56
  </form>
48
57
  </div>
@@ -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">2 sec</span>
12
+ <span class="current-interval">5 sec</span>
13
13
  <br/>
14
- <input type="range" min="2000" max="20000" step="1000" value="2000"/>
14
+ <input type="range" min="2000" max="20000" step="1000" value="5000"/>
15
15
  </div>
16
16
  </div>
17
17
 
@@ -58,14 +58,14 @@
58
58
  </div>
59
59
  <% end %>
60
60
 
61
- <% if @redis_info.fetch("used_memory_human", nil) %>
61
+ <% if @redis_info.fetch("used_memory_human", nil) %>
62
62
  <div class="stat">
63
63
  <h3 class="used_memory_human"><%= @redis_info.fetch("used_memory_human") %></h3>
64
64
  <p><%= t('MemoryUsage') %></p>
65
65
  </div>
66
66
  <% end %>
67
67
 
68
- <% if @redis_info.fetch("used_memory_peak_human", nil) %>
68
+ <% if @redis_info.fetch("used_memory_peak_human", nil) %>
69
69
  <div class="stat">
70
70
  <h3 class="used_memory_peak_human"><%= @redis_info.fetch("used_memory_peak_human") %></h3>
71
71
  <p><%= t('PeakMemoryUsage') %></p>
@@ -1,4 +1,4 @@
1
- <%= erb :_job_info, :locals => {:job => @dead, :type => :dead} %>
1
+ <%= erb :_job_info, locals: { job: @dead, type: :dead } %>
2
2
 
3
3
  <h3><%= t('Error') %></h3>
4
4
  <div class="table_container">
@@ -1,17 +1,26 @@
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="utf-8" />
5
6
  <meta name="viewport" content="width=device-width,initial-scale=1.0" />
7
+
6
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
+
7
13
  <link href="<%= root_path %>stylesheets/application.css" media="screen" rel="stylesheet" type="text/css" />
14
+ <% if rtl? %>
15
+ <link href="<%= root_path %>stylesheets/application-rtl.css" media="screen" rel="stylesheet" type="text/css" />
16
+ <% end %>
17
+
8
18
  <link rel="shortcut icon" type="image/ico" href="<%= root_path %>images/favicon.ico" />
9
19
  <script type="text/javascript" src="<%= root_path %>javascripts/application.js"></script>
10
- <script type="text/javascript" src="<%= root_path %>javascripts/locales/jquery.timeago.<%= locale %>.js"></script>
11
20
  <meta name="google" content="notranslate" />
12
21
  <%= display_custom_head %>
13
22
  </head>
14
- <body class="admin">
23
+ <body class="admin" data-poll-path="<%= poll_path %>" data-locale="<%= locale %>">
15
24
  <%= erb :_nav %>
16
25
  <div id="page">
17
26
  <div class="container">
@@ -26,7 +35,6 @@
26
35
  </div>
27
36
  </div>
28
37
  </div>
29
- <%= erb :_footer %>
30
- <%= erb :_poll_js %>
38
+ <%= erb :_footer %>
31
39
  </body>
32
40
  </html>
@@ -4,7 +4,7 @@
4
4
  </div>
5
5
  <% if @dead.size > 0 && @total_size > @count %>
6
6
  <div class="col-sm-4">
7
- <%= erb :_paging, :locals => { :url => "#{root_path}morgue" } %>
7
+ <%= erb :_paging, locals: { url: "#{root_path}morgue" } %>
8
8
  </div>
9
9
  <% end %>
10
10
  <%= filtering('dead') %>
@@ -17,7 +17,7 @@
17
17
  <table class="table table-striped table-bordered table-white">
18
18
  <thead>
19
19
  <tr>
20
- <th width="20px" class="table-checkbox">
20
+ <th class="table-checkbox checkbox-column">
21
21
  <label>
22
22
  <input type="checkbox" class="check_all" />
23
23
  </label>
@@ -47,24 +47,28 @@
47
47
  <div class="args"><%= display_args(entry.display_args) %></div>
48
48
  </td>
49
49
  <td>
50
+ <% if entry.error? %>
50
51
  <div><%= h truncate("#{entry['error_class']}: #{entry['error_message']}", 200) %></div>
52
+ <% end %>
51
53
  </td>
52
54
  </tr>
53
55
  <% end %>
54
56
  </table>
55
57
  </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') %>" />
58
+ <input class="btn btn-primary btn-xs pull-left flip" type="submit" name="retry" value="<%= t('RetryNow') %>" />
59
+ <input class="btn btn-danger btn-xs pull-left flip" type="submit" name="delete" value="<%= t('Delete') %>" />
58
60
  </form>
59
61
 
60
- <form action="<%= root_path %>morgue/all/delete" method="post">
61
- <%= csrf_tag %>
62
- <input class="btn btn-danger btn-xs pull-right" type="submit" name="delete" value="<%= t('DeleteAll') %>" data-confirm="<%= t('AreYouSure') %>" />
63
- </form>
64
- <form action="<%= root_path %>morgue/all/retry" method="post">
65
- <%= csrf_tag %>
66
- <input class="btn btn-danger btn-xs pull-right" type="submit" name="retry" value="<%= t('RetryAll') %>" data-confirm="<%= t('AreYouSure') %>" />
67
- </form>
62
+ <% unfiltered? do %>
63
+ <form action="<%= root_path %>morgue/all/delete" method="post">
64
+ <%= csrf_tag %>
65
+ <input class="btn btn-danger btn-xs pull-right flip" type="submit" name="delete" value="<%= t('DeleteAll') %>" data-confirm="<%= t('AreYouSure') %>" />
66
+ </form>
67
+ <form action="<%= root_path %>morgue/all/retry" method="post">
68
+ <%= csrf_tag %>
69
+ <input class="btn btn-danger btn-xs pull-right flip" type="submit" name="retry" value="<%= t('RetryAll') %>" data-confirm="<%= t('AreYouSure') %>" />
70
+ </form>
71
+ <% end %>
68
72
 
69
73
  <% else %>
70
74
  <div class="alert alert-success"><%= t('NoDeadJobsFound') %></div>
@@ -5,10 +5,11 @@
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">
@@ -22,19 +23,19 @@
22
23
  <tr>
23
24
  <td><%= h(msg.display_class) %></td>
24
25
  <td>
25
- <% a = msg.display_args.inspect %>
26
- <% if a.size > 100 %>
27
- <%= h(msg.display_args.inspect[0..100]) + "... " %>
28
- <button data-toggle="collapse" data-target="#worker_<%= index %>" class="btn btn-default btn-xs"><%= t('ShowAll') %></button>
29
- <div class="toggle" id="worker_<%= index %>" style="display: none;"><%= h(msg.display_args) %></div>
26
+ <% a = msg.display_args %>
27
+ <% if a.inspect.size > 100 %>
28
+ <span class="worker_<%= index %>"><%= h(a.inspect[0..100]) + "... " %></span>
29
+ <button data-toggle="collapse" data-target=".worker_<%= index %>" class="btn btn-default btn-xs"><%= t('ShowAll') %></button>
30
+ <div class="toggle worker_<%= index %>"><%= display_args(a) %></div>
30
31
  <% else %>
31
- <%= h(msg.display_args) %>
32
+ <%= display_args(msg.display_args) %>
32
33
  <% end %>
33
34
  </td>
34
35
  <td>
35
- <form action="<%= root_path %>queues/<%= @name %>/delete" method="post">
36
+ <form action="<%= root_path %>queues/<%= CGI.escape(@name) %>/delete" method="post">
36
37
  <%= csrf_tag %>
37
- <input name="key_val" value="<%= h Sidekiq.dump_json(msg.item) %>" type="hidden" />
38
+ <input name="key_val" value="<%= h msg.value %>" type="hidden" />
38
39
  <input class="btn btn-danger btn-xs" type="submit" name="delete" value="<%= t('Delete') %>" data-confirm="<%= t('AreYouSure') %>" />
39
40
  </form>
40
41
  </td>
@@ -42,4 +43,4 @@
42
43
  <% end %>
43
44
  </table>
44
45
  </div>
45
- <%= erb :_paging, :locals => { :url => "#{root_path}queues/#{@name}" } %>
46
+ <%= erb :_paging, locals: { url: "#{root_path}queues/#{@name}" } %>
@@ -5,19 +5,21 @@
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>
19
- <td width="20%">
20
- <form action="<%=root_path %>queues/<%= queue.name %>" method="post">
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>
21
+ <td class="delete-confirm">
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)) %>" />
23
25
  </form>