sidekiq 3.4.1 → 7.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (235) hide show
  1. checksums.yaml +5 -5
  2. data/Changes.md +1118 -4
  3. data/LICENSE.txt +9 -0
  4. data/README.md +55 -47
  5. data/bin/multi_queue_bench +271 -0
  6. data/bin/sidekiq +26 -3
  7. data/bin/sidekiqload +247 -0
  8. data/bin/sidekiqmon +11 -0
  9. data/lib/generators/sidekiq/job_generator.rb +57 -0
  10. data/lib/generators/sidekiq/templates/{worker.rb.erb → job.rb.erb} +2 -2
  11. data/lib/generators/sidekiq/templates/job_spec.rb.erb +6 -0
  12. data/lib/generators/sidekiq/templates/job_test.rb.erb +8 -0
  13. data/lib/sidekiq/api.rb +714 -312
  14. data/lib/sidekiq/capsule.rb +130 -0
  15. data/lib/sidekiq/cli.rb +275 -241
  16. data/lib/sidekiq/client.rb +141 -110
  17. data/lib/sidekiq/component.rb +68 -0
  18. data/lib/sidekiq/config.rb +291 -0
  19. data/lib/sidekiq/deploy.rb +62 -0
  20. data/lib/sidekiq/embedded.rb +61 -0
  21. data/lib/sidekiq/fetch.rb +53 -121
  22. data/lib/sidekiq/iterable_job.rb +53 -0
  23. data/lib/sidekiq/job/interrupt_handler.rb +22 -0
  24. data/lib/sidekiq/job/iterable/active_record_enumerator.rb +53 -0
  25. data/lib/sidekiq/job/iterable/csv_enumerator.rb +47 -0
  26. data/lib/sidekiq/job/iterable/enumerators.rb +135 -0
  27. data/lib/sidekiq/job/iterable.rb +231 -0
  28. data/lib/sidekiq/job.rb +385 -0
  29. data/lib/sidekiq/job_logger.rb +64 -0
  30. data/lib/sidekiq/job_retry.rb +305 -0
  31. data/lib/sidekiq/job_util.rb +107 -0
  32. data/lib/sidekiq/launcher.rb +241 -66
  33. data/lib/sidekiq/logger.rb +131 -0
  34. data/lib/sidekiq/manager.rb +91 -192
  35. data/lib/sidekiq/metrics/query.rb +156 -0
  36. data/lib/sidekiq/metrics/shared.rb +95 -0
  37. data/lib/sidekiq/metrics/tracking.rb +140 -0
  38. data/lib/sidekiq/middleware/chain.rb +114 -56
  39. data/lib/sidekiq/middleware/current_attributes.rb +111 -0
  40. data/lib/sidekiq/middleware/i18n.rb +8 -7
  41. data/lib/sidekiq/middleware/modules.rb +21 -0
  42. data/lib/sidekiq/monitor.rb +146 -0
  43. data/lib/sidekiq/paginator.rb +29 -16
  44. data/lib/sidekiq/processor.rb +248 -112
  45. data/lib/sidekiq/rails.rb +61 -27
  46. data/lib/sidekiq/redis_client_adapter.rb +114 -0
  47. data/lib/sidekiq/redis_connection.rb +68 -48
  48. data/lib/sidekiq/ring_buffer.rb +29 -0
  49. data/lib/sidekiq/scheduled.rb +173 -52
  50. data/lib/sidekiq/sd_notify.rb +149 -0
  51. data/lib/sidekiq/systemd.rb +24 -0
  52. data/lib/sidekiq/testing/inline.rb +7 -5
  53. data/lib/sidekiq/testing.rb +206 -65
  54. data/lib/sidekiq/transaction_aware_client.rb +51 -0
  55. data/lib/sidekiq/version.rb +4 -1
  56. data/lib/sidekiq/web/action.rb +99 -0
  57. data/lib/sidekiq/web/application.rb +479 -0
  58. data/lib/sidekiq/web/csrf_protection.rb +183 -0
  59. data/lib/sidekiq/web/helpers.rb +415 -0
  60. data/lib/sidekiq/web/router.rb +104 -0
  61. data/lib/sidekiq/web.rb +158 -200
  62. data/lib/sidekiq/worker_compatibility_alias.rb +13 -0
  63. data/lib/sidekiq.rb +100 -132
  64. data/sidekiq.gemspec +27 -23
  65. data/web/assets/images/apple-touch-icon.png +0 -0
  66. data/web/assets/images/favicon.ico +0 -0
  67. data/web/assets/javascripts/application.js +177 -72
  68. data/web/assets/javascripts/base-charts.js +106 -0
  69. data/web/assets/javascripts/chart.min.js +13 -0
  70. data/web/assets/javascripts/chartjs-plugin-annotation.min.js +7 -0
  71. data/web/assets/javascripts/dashboard-charts.js +192 -0
  72. data/web/assets/javascripts/dashboard.js +37 -286
  73. data/web/assets/javascripts/metrics.js +298 -0
  74. data/web/assets/stylesheets/application-dark.css +147 -0
  75. data/web/assets/stylesheets/application-rtl.css +163 -0
  76. data/web/assets/stylesheets/application.css +228 -247
  77. data/web/assets/stylesheets/bootstrap-rtl.min.css +9 -0
  78. data/web/assets/stylesheets/bootstrap.css +4 -8
  79. data/web/locales/ar.yml +87 -0
  80. data/web/locales/cs.yml +62 -52
  81. data/web/locales/da.yml +60 -53
  82. data/web/locales/de.yml +65 -53
  83. data/web/locales/el.yml +43 -24
  84. data/web/locales/en.yml +86 -61
  85. data/web/locales/es.yml +70 -53
  86. data/web/locales/fa.yml +80 -0
  87. data/web/locales/fr.yml +86 -56
  88. data/web/locales/gd.yml +99 -0
  89. data/web/locales/he.yml +80 -0
  90. data/web/locales/hi.yml +59 -59
  91. data/web/locales/it.yml +53 -53
  92. data/web/locales/ja.yml +78 -56
  93. data/web/locales/ko.yml +52 -52
  94. data/web/locales/lt.yml +83 -0
  95. data/web/locales/{no.yml → nb.yml} +62 -54
  96. data/web/locales/nl.yml +52 -52
  97. data/web/locales/pl.yml +45 -45
  98. data/web/locales/pt-br.yml +83 -55
  99. data/web/locales/pt.yml +51 -51
  100. data/web/locales/ru.yml +68 -60
  101. data/web/locales/sv.yml +53 -53
  102. data/web/locales/ta.yml +60 -60
  103. data/web/locales/tr.yml +101 -0
  104. data/web/locales/uk.yml +77 -0
  105. data/web/locales/ur.yml +80 -0
  106. data/web/locales/vi.yml +83 -0
  107. data/web/locales/zh-cn.yml +43 -16
  108. data/web/locales/zh-tw.yml +42 -8
  109. data/web/views/_footer.erb +22 -9
  110. data/web/views/_job_info.erb +27 -6
  111. data/web/views/_metrics_period_select.erb +12 -0
  112. data/web/views/_nav.erb +8 -22
  113. data/web/views/_paging.erb +3 -1
  114. data/web/views/_poll_link.erb +4 -0
  115. data/web/views/_summary.erb +7 -7
  116. data/web/views/busy.erb +91 -31
  117. data/web/views/dashboard.erb +52 -22
  118. data/web/views/dead.erb +5 -4
  119. data/web/views/filtering.erb +7 -0
  120. data/web/views/layout.erb +19 -7
  121. data/web/views/metrics.erb +91 -0
  122. data/web/views/metrics_for_job.erb +59 -0
  123. data/web/views/morgue.erb +26 -20
  124. data/web/views/queue.erb +36 -25
  125. data/web/views/queues.erb +24 -7
  126. data/web/views/retries.erb +29 -21
  127. data/web/views/retry.erb +6 -5
  128. data/web/views/scheduled.erb +20 -17
  129. data/web/views/scheduled_job_info.erb +2 -1
  130. metadata +101 -232
  131. data/.gitignore +0 -12
  132. data/.travis.yml +0 -16
  133. data/3.0-Upgrade.md +0 -70
  134. data/COMM-LICENSE +0 -85
  135. data/Contributing.md +0 -32
  136. data/Gemfile +0 -22
  137. data/LICENSE +0 -9
  138. data/Pro-2.0-Upgrade.md +0 -138
  139. data/Pro-Changes.md +0 -412
  140. data/Rakefile +0 -9
  141. data/bin/sidekiqctl +0 -93
  142. data/lib/generators/sidekiq/templates/worker_spec.rb.erb +0 -6
  143. data/lib/generators/sidekiq/templates/worker_test.rb.erb +0 -8
  144. data/lib/generators/sidekiq/worker_generator.rb +0 -49
  145. data/lib/sidekiq/actor.rb +0 -39
  146. data/lib/sidekiq/core_ext.rb +0 -105
  147. data/lib/sidekiq/exception_handler.rb +0 -30
  148. data/lib/sidekiq/extensions/action_mailer.rb +0 -56
  149. data/lib/sidekiq/extensions/active_record.rb +0 -39
  150. data/lib/sidekiq/extensions/class_methods.rb +0 -39
  151. data/lib/sidekiq/extensions/generic_proxy.rb +0 -24
  152. data/lib/sidekiq/logging.rb +0 -104
  153. data/lib/sidekiq/middleware/server/active_record.rb +0 -13
  154. data/lib/sidekiq/middleware/server/logging.rb +0 -35
  155. data/lib/sidekiq/middleware/server/retry_jobs.rb +0 -206
  156. data/lib/sidekiq/util.rb +0 -55
  157. data/lib/sidekiq/web_helpers.rb +0 -234
  158. data/lib/sidekiq/worker.rb +0 -89
  159. data/test/config.yml +0 -9
  160. data/test/env_based_config.yml +0 -11
  161. data/test/fake_env.rb +0 -0
  162. data/test/fixtures/en.yml +0 -2
  163. data/test/helper.rb +0 -39
  164. data/test/test_api.rb +0 -494
  165. data/test/test_cli.rb +0 -365
  166. data/test/test_client.rb +0 -269
  167. data/test/test_exception_handler.rb +0 -55
  168. data/test/test_extensions.rb +0 -120
  169. data/test/test_fetch.rb +0 -104
  170. data/test/test_logging.rb +0 -34
  171. data/test/test_manager.rb +0 -164
  172. data/test/test_middleware.rb +0 -159
  173. data/test/test_processor.rb +0 -166
  174. data/test/test_redis_connection.rb +0 -127
  175. data/test/test_retry.rb +0 -373
  176. data/test/test_scheduled.rb +0 -120
  177. data/test/test_scheduling.rb +0 -71
  178. data/test/test_sidekiq.rb +0 -69
  179. data/test/test_testing.rb +0 -82
  180. data/test/test_testing_fake.rb +0 -271
  181. data/test/test_testing_inline.rb +0 -93
  182. data/test/test_web.rb +0 -594
  183. data/test/test_web_helpers.rb +0 -52
  184. data/test/test_worker_generator.rb +0 -17
  185. data/web/assets/images/bootstrap/glyphicons-halflings-white.png +0 -0
  186. data/web/assets/images/bootstrap/glyphicons-halflings.png +0 -0
  187. data/web/assets/images/status/active.png +0 -0
  188. data/web/assets/images/status/idle.png +0 -0
  189. data/web/assets/javascripts/locales/README.md +0 -27
  190. data/web/assets/javascripts/locales/jquery.timeago.ar.js +0 -96
  191. data/web/assets/javascripts/locales/jquery.timeago.bg.js +0 -18
  192. data/web/assets/javascripts/locales/jquery.timeago.bs.js +0 -49
  193. data/web/assets/javascripts/locales/jquery.timeago.ca.js +0 -18
  194. data/web/assets/javascripts/locales/jquery.timeago.cs.js +0 -18
  195. data/web/assets/javascripts/locales/jquery.timeago.cy.js +0 -20
  196. data/web/assets/javascripts/locales/jquery.timeago.da.js +0 -18
  197. data/web/assets/javascripts/locales/jquery.timeago.de.js +0 -18
  198. data/web/assets/javascripts/locales/jquery.timeago.el.js +0 -18
  199. data/web/assets/javascripts/locales/jquery.timeago.en-short.js +0 -20
  200. data/web/assets/javascripts/locales/jquery.timeago.en.js +0 -20
  201. data/web/assets/javascripts/locales/jquery.timeago.es.js +0 -18
  202. data/web/assets/javascripts/locales/jquery.timeago.et.js +0 -18
  203. data/web/assets/javascripts/locales/jquery.timeago.fa.js +0 -22
  204. data/web/assets/javascripts/locales/jquery.timeago.fi.js +0 -28
  205. data/web/assets/javascripts/locales/jquery.timeago.fr-short.js +0 -16
  206. data/web/assets/javascripts/locales/jquery.timeago.fr.js +0 -17
  207. data/web/assets/javascripts/locales/jquery.timeago.he.js +0 -18
  208. data/web/assets/javascripts/locales/jquery.timeago.hr.js +0 -49
  209. data/web/assets/javascripts/locales/jquery.timeago.hu.js +0 -18
  210. data/web/assets/javascripts/locales/jquery.timeago.hy.js +0 -18
  211. data/web/assets/javascripts/locales/jquery.timeago.id.js +0 -18
  212. data/web/assets/javascripts/locales/jquery.timeago.it.js +0 -16
  213. data/web/assets/javascripts/locales/jquery.timeago.ja.js +0 -19
  214. data/web/assets/javascripts/locales/jquery.timeago.ko.js +0 -17
  215. data/web/assets/javascripts/locales/jquery.timeago.lt.js +0 -20
  216. data/web/assets/javascripts/locales/jquery.timeago.mk.js +0 -20
  217. data/web/assets/javascripts/locales/jquery.timeago.nl.js +0 -20
  218. data/web/assets/javascripts/locales/jquery.timeago.no.js +0 -18
  219. data/web/assets/javascripts/locales/jquery.timeago.pl.js +0 -31
  220. data/web/assets/javascripts/locales/jquery.timeago.pt-br.js +0 -16
  221. data/web/assets/javascripts/locales/jquery.timeago.pt.js +0 -16
  222. data/web/assets/javascripts/locales/jquery.timeago.ro.js +0 -18
  223. data/web/assets/javascripts/locales/jquery.timeago.rs.js +0 -49
  224. data/web/assets/javascripts/locales/jquery.timeago.ru.js +0 -34
  225. data/web/assets/javascripts/locales/jquery.timeago.sk.js +0 -18
  226. data/web/assets/javascripts/locales/jquery.timeago.sl.js +0 -44
  227. data/web/assets/javascripts/locales/jquery.timeago.sv.js +0 -18
  228. data/web/assets/javascripts/locales/jquery.timeago.th.js +0 -20
  229. data/web/assets/javascripts/locales/jquery.timeago.tr.js +0 -16
  230. data/web/assets/javascripts/locales/jquery.timeago.uk.js +0 -34
  231. data/web/assets/javascripts/locales/jquery.timeago.uz.js +0 -19
  232. data/web/assets/javascripts/locales/jquery.timeago.zh-cn.js +0 -20
  233. data/web/assets/javascripts/locales/jquery.timeago.zh-tw.js +0 -20
  234. data/web/views/_poll.erb +0 -10
  235. /data/web/assets/images/{status-sd8051fd480.png → status.png} +0 -0
@@ -0,0 +1,83 @@
1
+ # elements like %{queue} are variables and should not be translated
2
+ vi:
3
+ Actions: Những hành động
4
+ AddToQueue: Thêm vào hàng đợi
5
+ AreYouSure: Bạn chắc chứ?
6
+ AreYouSureDeleteJob: Bạn có chắc là muốn xóa tác vụ này?
7
+ AreYouSureDeleteQueue: Bạn có chắc là muốn xóa %{queue} này?
8
+ Arguments: Tham số
9
+ BackToApp: Trở về ứng dụng
10
+ Busy: Bận rộn
11
+ Class: Lớp
12
+ Connections: Các kết nối
13
+ CreatedAt: Được tạo vào lúc
14
+ CurrentMessagesInQueue: Số lượng công việc trong <span class='title'>%{queue}</span>
15
+ Dashboard: Bảng điều khiển
16
+ Dead: Chết
17
+ DeadJobs: Những tác vụ đã chết
18
+ Delete: Xóa
19
+ DeleteAll: Xóa hết
20
+ Enqueued: Đã xếp hàng đợi
21
+ Error: Lỗi
22
+ ErrorBacktrace: Dấu vết của lỗi
23
+ ErrorClass: Lớp lỗi
24
+ ErrorMessage: Tin nhắn lỗi
25
+ Extras: Thêm
26
+ Failed: Đã thất bại
27
+ Failures: Các thất bại
28
+ GoBack: ← Trở lại
29
+ History: Lịch sử
30
+ Job: Tác vụ
31
+ Jobs: Các tác vụ
32
+ Kill: Giết
33
+ KillAll: Giết hết
34
+ LastRetry: Lần thử cuối
35
+ Latency: Độ trễ
36
+ LivePoll: Thăm dò trực tiếp
37
+ MemoryUsage: Lượng bộ nhớ sử dụng
38
+ Namespace: Không gian tên
39
+ NextRetry: Lần thử lại tiếp theo
40
+ NoDeadJobsFound: Không có tác vụ đã chết nào được tìm thấy
41
+ NoRetriesFound: Không có lần thử nào được tìm thấy
42
+ NoScheduledFound: Không có tác vụ đã lên lịch nào được tìm thấy
43
+ NotYetEnqueued: Chưa được bỏ vào hàng đợi
44
+ OneMonth: 1 tháng
45
+ OneWeek: 1 tuần
46
+ OriginallyFailed: Đã thất bại từ đầu
47
+ Pause: Tạm dừng
48
+ Paused: Đã tạm dừng
49
+ PeakMemoryUsage: Lượng bộ nhớ sử dụng đỉnh điểm
50
+ Plugins: Hệ thống đính kèm
51
+ PollingInterval: Khoảng thời gian giữa các lần thăm dò
52
+ Processed: Đã xử lí
53
+ Processes: Tiến trình xử lí
54
+ Queue: Hàng đợi
55
+ Queues: Các hàng đợi
56
+ Quiet: Im lặng
57
+ QuietAll: Làm cho tất cả im lặng
58
+ Realtime: Thời gian thực
59
+ Retries: Số lần thử
60
+ RetryAll: Thử lại tất cả
61
+ RetryCount: Số lần thử lại
62
+ RetryNow: Thử lại ngay bây giờ
63
+ Scheduled: Đã lên lịch
64
+ ScheduledJobs: Những Tác Vụ Được Hẹn
65
+ ShowAll: Hiện tất cả
66
+ SixMonths: 6 tháng
67
+ Size: Kích thước
68
+ Started: Đã bắt đầu
69
+ Status: Trạng thái
70
+ Stop: Dừng Lại
71
+ StopAll: Dừng lại tất cả
72
+ StopPolling: Ngừng thăm dò
73
+ Thread: Luồng xử lí
74
+ Threads: Những luồng xử lí
75
+ ThreeMonths: 3 tháng
76
+ Time: Thời gian
77
+ Unpause: Hủy tạm dừng
78
+ Uptime: Thời gian hệ thống đã online (days)
79
+ Version: Phiên bản
80
+ When: Khi nào
81
+ Worker: Máy xử lí
82
+ active: Đang hoạt động
83
+ idle: Đang chờ
@@ -7,6 +7,7 @@ zh-cn: # <---- change this to your locale code
7
7
  Realtime: 实时
8
8
  History: 历史记录
9
9
  Busy: 执行中
10
+ Utilization: 利用率
10
11
  Processed: 已处理
11
12
  Failed: 已失败
12
13
  Scheduled: 已计划
@@ -17,36 +18,38 @@ zh-cn: # <---- change this to your locale code
17
18
  StopPolling: 停止轮询
18
19
  Queue: 队列
19
20
  Class: 类别
20
- Job: 作业
21
+ Job: 任务
21
22
  Arguments: 参数
22
23
  Extras: 额外的
23
24
  Started: 已开始
24
25
  ShowAll: 显示全部
25
- CurrentMessagesInQueue: 目前在<span class='title'>%{queue}</span>的作业
26
+ CurrentMessagesInQueue: 目前在<span class='title'>%{queue}</span>的任务
26
27
  Delete: 删除
27
28
  AddToQueue: 添加至队列
28
- AreYouSureDeleteJob: 你确定要删除这个作业么?
29
+ AreYouSureDeleteJob: 你确定要删除这个任务么?
29
30
  AreYouSureDeleteQueue: 你确定要删除%{queue}这个队列?
30
31
  Queues: 队列
31
32
  Size: 容量
32
33
  Actions: 动作
33
34
  NextRetry: 下次重试
34
- RetryCount: 重试次數
35
+ RetryCount: 重试次数
35
36
  RetryNow: 现在重试
36
- LastRetry: 最后一次重试
37
- OriginallyFailed: 原本已失败
37
+ Kill: 终止
38
+ LastRetry: 上次重试
39
+ OriginallyFailed: 首次失败
38
40
  AreYouSure: 你确定?
39
- DeleteAll: 删除全部
40
- RetryAll: 重试全部
41
- NoRetriesFound: 沒有发现可重试
41
+ DeleteAll: 全部删除
42
+ RetryAll: 全部重试
43
+ KillAll: 全部终止
44
+ NoRetriesFound: 没有发现可重试
42
45
  Error: 错误
43
46
  ErrorClass: 错误类别
44
47
  ErrorMessage: 错误消息
45
- ErrorBacktrace: 错误的回调追踪
48
+ ErrorBacktrace: 错误细节
46
49
  GoBack: ← 返回
47
- NoScheduledFound: 沒有发现计划作业
50
+ NoScheduledFound: 没有发现计划任务
48
51
  When: 当
49
- ScheduledJobs: 计划作业
52
+ ScheduledJobs: 计划任务
50
53
  idle: 闲置
51
54
  active: 活动中
52
55
  Version: 版本
@@ -59,10 +62,34 @@ zh-cn: # <---- change this to your locale code
59
62
  ThreeMonths: 三个月
60
63
  SixMonths: 六个月
61
64
  Failures: 失败
62
- DeadJobs: 已停滞作业
63
- NoDeadJobsFound: 沒有发现任何已停滞的作业
65
+ DeadJobs: 已停滞任务
66
+ NoDeadJobsFound: 没有发现任何已停滞的任务
64
67
  Dead: 已停滞
65
- Processes: 处理中
68
+ Process: 进程
69
+ Processes: 进程
70
+ Name: 名称
66
71
  Thread: 线程
67
72
  Threads: 线程
68
- Jobs: 作业
73
+ Jobs: 任务
74
+ Paused: 已暂停
75
+ Stop: 强制暂停
76
+ Quiet: 暂停
77
+ StopAll: 全部强制暂停
78
+ QuietAll: 全部暂停
79
+ PollingInterval: 轮询周期
80
+ Plugins: 插件
81
+ NotYetEnqueued: 尚未进入队列
82
+ CreatedAt: 建立时间
83
+ BackToApp: 回首頁
84
+ Latency: 延迟
85
+ Pause: 暂停
86
+ Unpause: 取消暂停
87
+ Metrics: 指标
88
+ NoDataFound: 无数据
89
+ TotalExecutionTime: 总执行时间
90
+ AvgExecutionTime: 平均执行时间
91
+ Context: 上下文
92
+ Bucket: 桶
93
+ NoJobMetricsFound: 无任务相关指标数据
94
+ Success: 成功
95
+ Failure: 失败
@@ -7,6 +7,7 @@ zh-tw: # <---- change this to your locale code
7
7
  Realtime: 即時
8
8
  History: 歷史資料
9
9
  Busy: 忙碌
10
+ Utilization: 使用率
10
11
  Processed: 已處理
11
12
  Failed: 已失敗
12
13
  Scheduled: 已排程
@@ -25,26 +26,29 @@ zh-tw: # <---- change this to your locale code
25
26
  CurrentMessagesInQueue: 目前在<span class='title'>%{queue}</span>的工作
26
27
  Delete: 刪除
27
28
  AddToQueue: 增加至佇列
28
- AreYouSureDeleteJob: 你確定要刪除這個工作嗎?
29
- AreYouSureDeleteQueue: 你確定要刪除%{queue}這個佇列?
29
+ AreYouSureDeleteJob: 確定要刪除這個工作嗎?
30
+ AreYouSureDeleteQueue: 確定要刪除%{queue}佇列?這會刪除佇列裡的所有工作,佇列將會在有新工作時重新出現。
30
31
  Queues: 佇列
31
32
  Size: 容量
32
33
  Actions: 動作
33
34
  NextRetry: 下次重試
34
35
  RetryCount: 重試次數
35
36
  RetryNow: 馬上重試
37
+ Kill: 取消
36
38
  LastRetry: 最後一次重試
37
39
  OriginallyFailed: 原本已失敗
38
40
  AreYouSure: 你確定?
39
- DeleteAll: 刪除全部
40
- RetryAll: 重試全部
41
- NoRetriesFound: 沒有發現可重試
41
+ DeleteAll: 全部刪除
42
+ RetryAll: 全部重試
43
+ KillAll: 全部取消
44
+ NoRetriesFound: 找無可重試的工作
42
45
  Error: 錯誤
46
+ ErrorBacktrace: 錯誤的回調追踨
43
47
  ErrorClass: 錯誤類別
44
48
  ErrorMessage: 錯誤訊息
45
- ErrorBacktrace: 錯誤的回調追踨
49
+ ErrorBacktrace: 詳細錯誤訊息
46
50
  GoBack: ← 返回
47
- NoScheduledFound: 沒有發現已排程的工作
51
+ NoScheduledFound: 找無已排程的工作
48
52
  When: 當
49
53
  ScheduledJobs: 已排程的工作
50
54
  idle: 閒置
@@ -59,10 +63,40 @@ zh-tw: # <---- change this to your locale code
59
63
  ThreeMonths: 三個月
60
64
  SixMonths: 六個月
61
65
  Failures: 失敗
62
- DeadJobs: 停滯工作
66
+ GoBack: ← 返回
67
+ History: 歷史資料
68
+ Job: 工作
69
+ Jobs: 工作
70
+ LastRetry: 最後一次重試
71
+ LivePoll: 即時輪詢
72
+ MemoryUsage: 記憶體使用量
73
+ Namespace: 命名空間
74
+ NextRetry: 下次重試
63
75
  NoDeadJobsFound: 沒有發現任何停滯的工作
64
76
  Dead: 停滯
77
+ Process: 程序
65
78
  Processes: 處理中
79
+ Name: 名稱
66
80
  Thread: 執行緒
67
81
  Threads: 執行緒
68
82
  Jobs: 工作
83
+ Paused: 已暫停
84
+ Stop: 強制暫停
85
+ Quiet: 暫停
86
+ StopAll: 全部強制暫停
87
+ QuietAll: 全部暫停
88
+ PollingInterval: 輪詢週期
89
+ Plugins: 套件
90
+ NotYetEnqueued: 尚未進入佇列
91
+ CreatedAt: 建立時間
92
+ BackToApp: 回首頁
93
+ Latency: 延時
94
+ Pause: 暫停
95
+ Unpause: 取消暫停
96
+ Metrics: 計量
97
+ NoDataFound: 找無資料
98
+ TotalExecutionTime: 總執行時間
99
+ AvgExecutionTime: 平均執行時間
100
+ Context: 上下文
101
+ Bucket: 桶
102
+ NoJobMetricsFound: 找無工作相關計量資料
@@ -1,21 +1,34 @@
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_url %>"><%= redis_url %></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 id="serverUtcTime" class="navbar-text server-utc-time"><%= server_utc_time %></p>
13
+ </li>
14
+ <li>
15
+ <p class="navbar-text"><a rel=help href="https://github.com/sidekiq/sidekiq/wiki">docs</a></p>
16
+ </li>
17
+ <li>
18
+ <form id="locale-form" class="form-inline" action="<%= root_path %>change_locale" method="post">
19
+ <%= csrf_tag %>
20
+ <label class="sr-only" for="locale">Language</label>
21
+ <select id="locale-select" class="form-control" name="locale">
22
+ <% available_locales.each do |locale_option| %>
23
+ <% if locale_option == locale %>
24
+ <option selected value="<%= locale_option %>"><%= locale_option %></option>
25
+ <% else %>
26
+ <option value="<%= locale_option %>"><%= locale_option %></option>
27
+ <% end %>
28
+ <% end %>
29
+ </select>
30
+ </form>
13
31
  </li>
14
- <% if namespace %>
15
- <li>
16
- <p class="navbar-text redis-namespace"><%= t('Namespace') %>: <%= namespace %></p>
17
- </li>
18
- <% end %>
19
32
  </ul>
20
33
  </div>
21
34
  </div>
@@ -1,9 +1,9 @@
1
- <header>
1
+ <div class="header-container">
2
2
  <h3><%= t('Job') %></h3>
3
- </header>
3
+ </div>
4
4
 
5
5
  <div class="table_container">
6
- <table class="table table-bordered table-striped">
6
+ <table class="table table-bordered table-striped table-hover">
7
7
  <tbody>
8
8
  <tr>
9
9
  <th><%= t('Queue') %></th>
@@ -14,7 +14,8 @@
14
14
  <tr>
15
15
  <th><%= t('Job') %></th>
16
16
  <td>
17
- <code><%= job.display_class %></code>
17
+ <%= job.display_class %>
18
+ <%= display_tags(job) %>
18
19
  </td>
19
20
  </tr>
20
21
  <tr>
@@ -32,9 +33,21 @@
32
33
  <code><%= job.jid %></code>
33
34
  </td>
34
35
  </tr>
36
+ <% if job.bid %>
37
+ <tr>
38
+ <th>BID</th>
39
+ <td>
40
+ <a href="<%= root_path %>batches/<%= job.bid %>"><%= job.bid %></a>
41
+ </td>
42
+ </tr>
43
+ <% end %>
44
+ <tr>
45
+ <th><%= t('CreatedAt') %></th>
46
+ <td><%= relative_time(job.created_at) %></td>
47
+ </tr>
35
48
  <tr>
36
49
  <th><%= t('Enqueued') %></th>
37
- <td><%= relative_time(job.enqueued_at) %></td>
50
+ <td><%= (enqueued_at = job.enqueued_at) ? relative_time(enqueued_at) : t('NotYetEnqueued') %></td>
38
51
  </tr>
39
52
  <% unless retry_extra_items(job).empty? %>
40
53
  <tr>
@@ -76,9 +89,17 @@
76
89
  <% if type == :dead %>
77
90
  <tr>
78
91
  <th><%= t('LastRetry') %></th>
79
- <td><%= relative_time(job.at) %></td>
92
+ <td><%= relative_time(job.at) if job['retry_count'] %></td>
80
93
  </tr>
81
94
  <% end %>
95
+ <% Sidekiq::Web.custom_job_info_rows.each do |helper| %>
96
+ <% helper.add_pair(job) do |name, value| %>
97
+ <tr>
98
+ <th><%= name %></th>
99
+ <td><%= value %></td>
100
+ </tr>
101
+ <% end %>
102
+ <% end %>
82
103
  </tbody>
83
104
  </table>
84
105
  </div>
@@ -0,0 +1,12 @@
1
+ <div>
2
+ <select class="form-control" data-metric-period="<%= path %>">
3
+ <% periods.each_key do |code| %>
4
+
5
+ <% if code == period %>
6
+ <option selected value="<%= code %>"><%= code %></option>
7
+ <% else %>
8
+ <option value="<%= code %>"><%= code %></option>
9
+ <% end %>
10
+ <% end %>
11
+ </select>
12
+ </div>
data/web/views/_nav.erb CHANGED
@@ -1,15 +1,15 @@
1
1
  <div class="navbar navbar-default navbar-fixed-top">
2
2
  <div class="container-fluid">
3
3
  <div class="navbar-header" data-navbar="static">
4
- <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-menu">
4
+ <button type="button" class="navbar-toggle collapsed" data-toggle="navbar-menu" data-target="#navbar-menu">
5
5
  <span class="icon-bar"></span>
6
6
  <span class="icon-bar"></span>
7
7
  <span class="icon-bar"></span>
8
8
  </button>
9
9
  <div class="navbar-toggle collapsed navbar-livereload">
10
- <%= erb :_poll %>
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">
57
- <%= erb :_poll %>
40
+
41
+ <li class="navbar-livereload">
42
+ <div class="poll-wrapper">
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,6 @@
1
+ <div>
1
2
  <% if @total_size > @count %>
2
- <ul class="pagination pull-right">
3
+ <ul class="pagination pull-right flip">
3
4
  <li class="<%= 'disabled' if @current_page == 1 %>">
4
5
  <a href="<%= url %>?page=1">&laquo;</a>
5
6
  </li>
@@ -21,3 +22,4 @@
21
22
  </li>
22
23
  </ul>
23
24
  <% end %>
25
+ </div>
@@ -0,0 +1,4 @@
1
+ <% if pollable? %>
2
+ <a class="live-poll-start live-poll btn btn-primary"><%= t('LivePoll') %></a>
3
+ <a class="live-poll-stop live-poll btn btn-primary active"><%= t('StopPolling') %></a>
4
+ <% end %>
@@ -1,39 +1,39 @@
1
1
  <ul class="list-unstyled summary row">
2
2
  <li class="processed col-sm-1">
3
- <span class="count"><%= number_with_delimiter(stats.processed) %></span>
3
+ <span id="txtProcessed" class="count" data-nwp><%= stats.processed %></span>
4
4
  <span class="desc"><%= t('Processed') %></span>
5
5
  </li>
6
6
  <li class="failed col-sm-1">
7
- <span class="count"><%= number_with_delimiter(stats.failed) %></span>
7
+ <span id="txtFailed" class="count" data-nwp><%= stats.failed %></span>
8
8
  <span class="desc"><%= t('Failed') %></span>
9
9
  </li>
10
10
  <li class="busy col-sm-1">
11
11
  <a href="<%= root_path %>busy">
12
- <span class="count"><%= number_with_delimiter(workers.size) %></span>
12
+ <span id="txtBusy" class="count" data-nwp><%= workset.size %></span>
13
13
  <span class="desc"><%= t('Busy') %></span>
14
14
  </a>
15
15
  </li>
16
16
  <li class="enqueued col-sm-1">
17
17
  <a href="<%= root_path %>queues">
18
- <span class="count"><%= number_with_delimiter(stats.enqueued) %></span>
18
+ <span id="txtEnqueued" class="count" data-nwp><%= stats.enqueued %></span>
19
19
  <span class="desc"><%= t('Enqueued') %></span>
20
20
  </a>
21
21
  </li>
22
22
  <li class="retries col-sm-1">
23
23
  <a href="<%= root_path %>retries">
24
- <span class="count"><%= number_with_delimiter(stats.retry_size) %></span>
24
+ <span id="txtRetries" class="count" data-nwp><%= stats.retry_size %></span>
25
25
  <span class="desc"><%= t('Retries') %></span>
26
26
  </a>
27
27
  </li>
28
28
  <li class="scheduled col-sm-1">
29
29
  <a href="<%= root_path %>scheduled">
30
- <span class="count"><%= number_with_delimiter(stats.scheduled_size) %></span>
30
+ <span id="txtScheduled" class="count" data-nwp><%= stats.scheduled_size %></span>
31
31
  <span class="desc"><%= t('Scheduled') %></span>
32
32
  </a>
33
33
  </li>
34
34
  <li class="dead col-sm-1">
35
35
  <a href="<%= root_path %>morgue">
36
- <span class="count"><%= number_with_delimiter(stats.dead_size) %></span>
36
+ <span id="txtDead" class="count" data-nwp><%= stats.dead_size %></span>
37
37
  <span class="desc"><%= t('Dead') %></span>
38
38
  </a>
39
39
  </li>