sidekiq 5.2.1 → 6.0.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 (86) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +60 -0
  3. data/.gitignore +1 -1
  4. data/.standard.yml +20 -0
  5. data/6.0-Upgrade.md +72 -0
  6. data/COMM-LICENSE +11 -9
  7. data/Changes.md +209 -0
  8. data/Ent-2.0-Upgrade.md +37 -0
  9. data/Ent-Changes.md +36 -1
  10. data/Gemfile +19 -9
  11. data/Gemfile.lock +208 -0
  12. data/Pro-5.0-Upgrade.md +25 -0
  13. data/Pro-Changes.md +44 -1
  14. data/README.md +19 -31
  15. data/Rakefile +6 -4
  16. data/bin/sidekiq +19 -0
  17. data/bin/sidekiqload +33 -25
  18. data/bin/sidekiqmon +8 -0
  19. data/lib/generators/sidekiq/templates/worker_test.rb.erb +1 -1
  20. data/lib/generators/sidekiq/worker_generator.rb +21 -13
  21. data/lib/sidekiq/api.rb +240 -214
  22. data/lib/sidekiq/cli.rb +167 -219
  23. data/lib/sidekiq/client.rb +61 -46
  24. data/lib/sidekiq/delay.rb +5 -6
  25. data/lib/sidekiq/exception_handler.rb +10 -12
  26. data/lib/sidekiq/extensions/action_mailer.rb +10 -20
  27. data/lib/sidekiq/extensions/active_record.rb +9 -7
  28. data/lib/sidekiq/extensions/class_methods.rb +9 -7
  29. data/lib/sidekiq/extensions/generic_proxy.rb +4 -4
  30. data/lib/sidekiq/fetch.rb +11 -12
  31. data/lib/sidekiq/job_logger.rb +47 -9
  32. data/lib/sidekiq/job_retry.rb +79 -58
  33. data/lib/sidekiq/launcher.rb +86 -54
  34. data/lib/sidekiq/logger.rb +165 -0
  35. data/lib/sidekiq/manager.rb +10 -12
  36. data/lib/sidekiq/middleware/chain.rb +14 -4
  37. data/lib/sidekiq/middleware/i18n.rb +5 -7
  38. data/lib/sidekiq/monitor.rb +133 -0
  39. data/lib/sidekiq/paginator.rb +18 -14
  40. data/lib/sidekiq/processor.rb +113 -79
  41. data/lib/sidekiq/rails.rb +24 -29
  42. data/lib/sidekiq/redis_connection.rb +42 -24
  43. data/lib/sidekiq/scheduled.rb +28 -29
  44. data/lib/sidekiq/sd_notify.rb +149 -0
  45. data/lib/sidekiq/systemd.rb +24 -0
  46. data/lib/sidekiq/testing/inline.rb +2 -1
  47. data/lib/sidekiq/testing.rb +34 -23
  48. data/lib/sidekiq/util.rb +17 -16
  49. data/lib/sidekiq/version.rb +2 -1
  50. data/lib/sidekiq/web/action.rb +14 -10
  51. data/lib/sidekiq/web/application.rb +79 -69
  52. data/lib/sidekiq/web/helpers.rb +89 -71
  53. data/lib/sidekiq/web/router.rb +17 -16
  54. data/lib/sidekiq/web.rb +41 -49
  55. data/lib/sidekiq/worker.rb +134 -91
  56. data/lib/sidekiq.rb +69 -44
  57. data/sidekiq.gemspec +16 -18
  58. data/web/assets/javascripts/application.js +22 -19
  59. data/web/assets/javascripts/dashboard.js +16 -25
  60. data/web/assets/stylesheets/application-dark.css +122 -0
  61. data/web/assets/stylesheets/application.css +44 -2
  62. data/web/assets/stylesheets/bootstrap.css +1 -1
  63. data/web/locales/ar.yml +1 -0
  64. data/web/locales/de.yml +14 -2
  65. data/web/locales/en.yml +3 -0
  66. data/web/locales/fr.yml +2 -2
  67. data/web/locales/ja.yml +4 -1
  68. data/web/locales/lt.yml +83 -0
  69. data/web/locales/vi.yml +83 -0
  70. data/web/views/_job_info.erb +2 -1
  71. data/web/views/_nav.erb +3 -17
  72. data/web/views/busy.erb +4 -1
  73. data/web/views/dead.erb +2 -2
  74. data/web/views/layout.erb +1 -0
  75. data/web/views/morgue.erb +4 -1
  76. data/web/views/queue.erb +11 -1
  77. data/web/views/queues.erb +9 -1
  78. data/web/views/retries.erb +8 -1
  79. data/web/views/retry.erb +2 -2
  80. data/web/views/scheduled.erb +4 -1
  81. metadata +37 -27
  82. data/.travis.yml +0 -14
  83. data/bin/sidekiqctl +0 -99
  84. data/lib/sidekiq/core_ext.rb +0 -1
  85. data/lib/sidekiq/logging.rb +0 -122
  86. data/lib/sidekiq/middleware/server/active_record.rb +0 -23
@@ -0,0 +1,83 @@
1
+ # elements like %{queue} are variables and should not be translated
2
+ lt:
3
+ Dashboard: Valdymo skydas
4
+ Status: Būsena
5
+ Time: Laikas
6
+ Namespace: Vardų erdvė
7
+ Realtime: Realiu laiku
8
+ History: Istorija
9
+ Busy: Užimti
10
+ Processed: Įvykdyti
11
+ Failed: Nepavykę
12
+ Scheduled: Suplanuoti
13
+ Retries: Kartojami
14
+ Enqueued: Eilėje
15
+ Worker: Darbuotojas
16
+ LivePoll: Užklausti gyvai
17
+ StopPolling: Stabdyti užklausas
18
+ Queue: Eilė
19
+ Class: Klasė
20
+ Job: Darbas
21
+ Arguments: Parametrai
22
+ Extras: Papildomi
23
+ Started: Pradėti
24
+ ShowAll: Rodyti Visus
25
+ CurrentMessagesInQueue: Esami darbai eilėje <span class='title'>%{queue}</span>
26
+ Delete: Pašalinti
27
+ AddToQueue: Pridėti į eilę
28
+ AreYouSureDeleteJob: Ar tikrai norite pašalinti šį darbą?
29
+ AreYouSureDeleteQueue: Ar tikrai norite pašalinti šią eilę %{queue}?
30
+ Queues: Eilės
31
+ Size: Dydis
32
+ Actions: Veiksmai
33
+ NextRetry: Sekantis Kartojimas
34
+ RetryCount: Kartojimų Skaičius
35
+ RetryNow: Kartoti Dabar
36
+ Kill: Priverstinai Nutraukti
37
+ LastRetry: Paskutinis Kartojimas
38
+ OriginallyFailed: Iš pradžių Nepavykę
39
+ AreYouSure: Ar jūs įsitikinę?
40
+ DeleteAll: Pašalinti Visus
41
+ RetryAll: Kartoti Visus
42
+ KillAll: Priverstinai Nutraukti Visus
43
+ NoRetriesFound: Nerasta kartojimų
44
+ Error: Klaida
45
+ ErrorClass: Klaidos Klasė
46
+ ErrorMessage: Klaidos Žinutė
47
+ ErrorBacktrace: Klaidos Pėdsakai
48
+ GoBack: ← Atgal
49
+ NoScheduledFound: Planuojamų darbų nerasta
50
+ When: Kada
51
+ ScheduledJobs: Planuojami Darbai
52
+ idle: neveiksnus
53
+ active: aktyvus
54
+ Version: Versija
55
+ Connections: Ryšiai
56
+ MemoryUsage: Atminties Vartojimas
57
+ PeakMemoryUsage: Atminties Vartojimo Pikas
58
+ Uptime: Gyvavimo laikas (dienomis)
59
+ OneWeek: 1 savaitė
60
+ OneMonth: 1 mėnuo
61
+ ThreeMonths: 3 mėnesiai
62
+ SixMonths: 6 mėnesiai
63
+ Failures: Nesėkmingi vykdymai
64
+ DeadJobs: Negyvi Darbai
65
+ NoDeadJobsFound: Negyvų darbų nerasta
66
+ Dead: Negyvi
67
+ Processes: Procesai
68
+ Thread: Gija
69
+ Threads: Gijos
70
+ Jobs: Darbai
71
+ Paused: Pristabdytas
72
+ Stop: Sustabdyti
73
+ Quiet: Nutildyti
74
+ StopAll: Sustbadyti Visus
75
+ QuietAll: Nutildyti Visus
76
+ PollingInterval: Užklausimų intervalas
77
+ Plugins: Įskiepiai
78
+ NotYetEnqueued: Dar neįtraukti į eilę
79
+ CreatedAt: Sukurta
80
+ BackToApp: Atgal į Aplikaciją
81
+ Latency: Vėlavimas
82
+ Pause: Pristabdyti
83
+ Unpause: Pratęsti
@@ -0,0 +1,83 @@
1
+ # elements like %{queue} are variables and should not be translated
2
+ vi: # <---- change this to your locale code
3
+ Dashboard: Bảng điều khiển
4
+ Status: Trạng thái
5
+ Time: Thời gian
6
+ Namespace: Không gian tên
7
+ Realtime: Thời gian thực
8
+ History: Lịch sử
9
+ Busy: Bận rộn
10
+ Processed: Đã xử lí
11
+ Failed: Đã thất bại
12
+ Scheduled: Đã lên lịch
13
+ Retries: Số lần thử
14
+ Enqueued: Đã xếp hàng đợi
15
+ Worker: Máy xử lí
16
+ LivePoll: Thăm dò trực tiếp
17
+ StopPolling: Ngừng thăm dò
18
+ Queue: Hàng đợi
19
+ Class: Lớp
20
+ Job: Tác vụ
21
+ Arguments: Tham số
22
+ Extras: Thêm
23
+ Started: Đã bắt đầu
24
+ ShowAll: Hiện tất cả
25
+ CurrentMessagesInQueue: Số lượng công việc trong <span class='title'>%{queue}</span>
26
+ Delete: Xóa
27
+ AddToQueue: Thêm vào hàng đợi
28
+ AreYouSureDeleteJob: Bạn có chắc là muốn xóa tác vụ này?
29
+ AreYouSureDeleteQueue: Bạn có chắc là muốn xóa %{queue} này?
30
+ Queues: Các hàng đợi
31
+ Size: Kích thước
32
+ Actions: Những hành động
33
+ NextRetry: Lần thử lại tiếp theo
34
+ RetryCount: Số lần thử lại
35
+ RetryNow: Thử lại ngay bây giờ
36
+ Kill: Giết
37
+ LastRetry: Lần thử cuối
38
+ OriginallyFailed: Đã thất bại từ đầu
39
+ AreYouSure: Bạn chắc chứ?
40
+ DeleteAll: Xóa hết
41
+ RetryAll: Thử lại tất cả
42
+ KillAll: Giết hết
43
+ NoRetriesFound: Không có lần thử nào được tìm thấy
44
+ Error: Lỗi
45
+ ErrorClass: Lớp lỗi
46
+ ErrorMessage: Tin nhắn lỗi
47
+ ErrorBacktrace: Dấu vết của lỗi
48
+ GoBack: ← Trở lại
49
+ NoScheduledFound: Không có tác vụ đã lên lịch nào được tìm thấy
50
+ When: Khi nào
51
+ ScheduledJobs: Những Tác Vụ Được Hẹn
52
+ idle: Đang chờ
53
+ active: Đang hoạt động
54
+ Version: Phiên bản
55
+ Connections: Các kết nối
56
+ MemoryUsage: Lượng bộ nhớ sử dụng
57
+ PeakMemoryUsage: Lượng bộ nhớ sử dụng đỉnh điểm
58
+ Uptime: Thời gian hệ thống đã online (days)
59
+ OneWeek: 1 tuần
60
+ OneMonth: 1 tháng
61
+ ThreeMonths: 3 tháng
62
+ SixMonths: 6 tháng
63
+ Failures: Các thất bại
64
+ DeadJobs: Những tác vụ đã chết
65
+ NoDeadJobsFound: Không có tác vụ đã chết nào được tìm thấy
66
+ Dead: Chết
67
+ Processes: Tiến trình xử lí
68
+ Thread: Luồng xử lí
69
+ Threads: Những luồng xử lí
70
+ Jobs: Các tác vụ
71
+ Paused: Đã tạm dừng
72
+ Stop: Dừng Lại
73
+ Quiet: Im lặng
74
+ StopAll: Dừng lại tất cả
75
+ QuietAll: Làm cho tất cả im lặng
76
+ PollingInterval: Khoảng thời gian giữa các lần thăm dò
77
+ Plugins: Hệ thống đính kèm
78
+ NotYetEnqueued: Chưa được bỏ vào hàng đợi
79
+ CreatedAt: Được tạo vào lúc
80
+ BackToApp: Trở về ứng dụng
81
+ Latency: Độ trễ
82
+ Pause: Tạm dừng
83
+ Unpause: Hủy tạm dừng
@@ -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>
data/web/views/_nav.erb CHANGED
@@ -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,27 +32,13 @@
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>
40
+
41
+ <li class="navbar-livereload">
56
42
  <div class="poll-wrapper">
57
43
  <%= erb :_poll_link %>
58
44
  <% if Sidekiq::Web.app_url %>
data/web/views/busy.erb CHANGED
@@ -87,7 +87,10 @@
87
87
  <td>
88
88
  <a href="<%= root_path %>queues/<%= msg['queue'] %>"><%= msg['queue'] %></a>
89
89
  </td>
90
- <td><%= job.display_class %></td>
90
+ <td>
91
+ <%= job.display_class %>
92
+ <%= display_tags(job, nil) %>
93
+ </td>
91
94
  <td>
92
95
  <div class="args"><%= display_args(job.display_args) %></div>
93
96
  </td>
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 !@dead['error_backtrace'].nil? %>
17
+ <% if @dead.error_backtrace %>
18
18
  <tr>
19
19
  <th><%= t('ErrorBacktrace') %></th>
20
20
  <td>
21
- <code><%= @dead['error_backtrace'].join("<br/>") %></code>
21
+ <code><%= @dead.error_backtrace.join("<br/>") %></code>
22
22
  </td>
23
23
  </tr>
24
24
  <% end %>
data/web/views/layout.erb CHANGED
@@ -11,6 +11,7 @@
11
11
  <% end %>
12
12
 
13
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" />
14
15
  <% if rtl? %>
15
16
  <link href="<%= root_path %>stylesheets/application-rtl.css" media="screen" rel="stylesheet" type="text/css" />
16
17
  <% end %>
data/web/views/morgue.erb CHANGED
@@ -42,7 +42,10 @@
42
42
  <td>
43
43
  <a href="<%= root_path %>queues/<%= entry.queue %>"><%= entry.queue %></a>
44
44
  </td>
45
- <td><%= entry.display_class %></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>
data/web/views/queue.erb CHANGED
@@ -5,6 +5,7 @@
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
11
  <div class="col-sm-4 pull-right flip">
@@ -14,13 +15,22 @@
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
- <td><%= h(msg.display_class) %></td>
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 %>
30
+ <td>
31
+ <%= h(msg.display_class) %>
32
+ <%= display_tags(msg, nil) %>
33
+ </td>
24
34
  <td>
25
35
  <% a = msg.display_args %>
26
36
  <% if a.inspect.size > 100 %>
data/web/views/queues.erb CHANGED
@@ -17,11 +17,19 @@
17
17
  <% end %>
18
18
  </td>
19
19
  <td><%= number_with_delimiter(queue.size) %> </td>
20
- <td><%= number_with_delimiter(queue.latency.round(2)) %> </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>
21
21
  <td class="delete-confirm">
22
22
  <form action="<%=root_path %>queues/<%= CGI.escape(queue.name) %>" method="post">
23
23
  <%= csrf_tag %>
24
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 %>
25
33
  </form>
26
34
  </td>
27
35
  </tr>
@@ -44,7 +44,10 @@
44
44
  <td>
45
45
  <a href="<%= root_path %>queues/<%= entry.queue %>"><%= entry.queue %></a>
46
46
  </td>
47
- <td><%= entry.display_class %></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>
@@ -69,6 +72,10 @@
69
72
  <%= csrf_tag %>
70
73
  <input class="btn btn-danger btn-xs pull-right flip" type="submit" name="retry" value="<%= t('RetryAll') %>" data-confirm="<%= t('AreYouSure') %>" />
71
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>
72
79
  <% end %>
73
80
 
74
81
  <% else %>
data/web/views/retry.erb CHANGED
@@ -14,11 +14,11 @@
14
14
  <th><%= t('ErrorMessage') %></th>
15
15
  <td><%= h(@retry['error_message']) %></td>
16
16
  </tr>
17
- <% if !@retry['error_backtrace'].nil? %>
17
+ <% if @retry.error_backtrace %>
18
18
  <tr>
19
19
  <th><%= t('ErrorBacktrace') %></th>
20
20
  <td>
21
- <code><%= @retry['error_backtrace'].join("<br/>") %></code>
21
+ <code><%= @retry.error_backtrace.join("<br/>") %></code>
22
22
  </td>
23
23
  </tr>
24
24
  <% end %>
@@ -38,7 +38,10 @@
38
38
  <td>
39
39
  <a href="<%= root_path %>queues/<%= entry.queue %>"><%= entry.queue %></a>
40
40
  </td>
41
- <td><%= entry.display_class %></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>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.1
4
+ version: 6.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Perham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-10 00:00:00.000000000 Z
11
+ date: 2020-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis
@@ -16,27 +16,18 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 3.3.5
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: '5'
19
+ version: 4.1.0
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - ">="
28
25
  - !ruby/object:Gem::Version
29
- version: 3.3.5
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: '5'
26
+ version: 4.1.0
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: connection_pool
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: '2.2'
40
31
  - - ">="
41
32
  - !ruby/object:Gem::Version
42
33
  version: 2.2.2
@@ -44,56 +35,72 @@ dependencies:
44
35
  prerelease: false
45
36
  version_requirements: !ruby/object:Gem::Requirement
46
37
  requirements:
47
- - - "~>"
48
- - !ruby/object:Gem::Version
49
- version: '2.2'
50
38
  - - ">="
51
39
  - !ruby/object:Gem::Version
52
40
  version: 2.2.2
41
+ - !ruby/object:Gem::Dependency
42
+ name: rack
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.0'
53
55
  - !ruby/object:Gem::Dependency
54
56
  name: rack-protection
55
57
  requirement: !ruby/object:Gem::Requirement
56
58
  requirements:
57
59
  - - ">="
58
60
  - !ruby/object:Gem::Version
59
- version: 1.5.0
61
+ version: 2.0.0
60
62
  type: :runtime
61
63
  prerelease: false
62
64
  version_requirements: !ruby/object:Gem::Requirement
63
65
  requirements:
64
66
  - - ">="
65
67
  - !ruby/object:Gem::Version
66
- version: 1.5.0
68
+ version: 2.0.0
67
69
  description: Simple, efficient background processing for Ruby.
68
70
  email:
69
71
  - mperham@gmail.com
70
72
  executables:
71
73
  - sidekiq
72
- - sidekiqctl
74
+ - sidekiqmon
73
75
  extensions: []
74
76
  extra_rdoc_files: []
75
77
  files:
78
+ - ".circleci/config.yml"
76
79
  - ".github/contributing.md"
77
80
  - ".github/issue_template.md"
78
81
  - ".gitignore"
79
- - ".travis.yml"
82
+ - ".standard.yml"
80
83
  - 3.0-Upgrade.md
81
84
  - 4.0-Upgrade.md
82
85
  - 5.0-Upgrade.md
86
+ - 6.0-Upgrade.md
83
87
  - COMM-LICENSE
84
88
  - Changes.md
89
+ - Ent-2.0-Upgrade.md
85
90
  - Ent-Changes.md
86
91
  - Gemfile
92
+ - Gemfile.lock
87
93
  - LICENSE
88
94
  - Pro-2.0-Upgrade.md
89
95
  - Pro-3.0-Upgrade.md
90
96
  - Pro-4.0-Upgrade.md
97
+ - Pro-5.0-Upgrade.md
91
98
  - Pro-Changes.md
92
99
  - README.md
93
100
  - Rakefile
94
101
  - bin/sidekiq
95
- - bin/sidekiqctl
96
102
  - bin/sidekiqload
103
+ - bin/sidekiqmon
97
104
  - code_of_conduct.md
98
105
  - lib/generators/sidekiq/templates/worker.rb.erb
99
106
  - lib/generators/sidekiq/templates/worker_spec.rb.erb
@@ -103,7 +110,6 @@ files:
103
110
  - lib/sidekiq/api.rb
104
111
  - lib/sidekiq/cli.rb
105
112
  - lib/sidekiq/client.rb
106
- - lib/sidekiq/core_ext.rb
107
113
  - lib/sidekiq/delay.rb
108
114
  - lib/sidekiq/exception_handler.rb
109
115
  - lib/sidekiq/extensions/action_mailer.rb
@@ -114,16 +120,18 @@ files:
114
120
  - lib/sidekiq/job_logger.rb
115
121
  - lib/sidekiq/job_retry.rb
116
122
  - lib/sidekiq/launcher.rb
117
- - lib/sidekiq/logging.rb
123
+ - lib/sidekiq/logger.rb
118
124
  - lib/sidekiq/manager.rb
119
125
  - lib/sidekiq/middleware/chain.rb
120
126
  - lib/sidekiq/middleware/i18n.rb
121
- - lib/sidekiq/middleware/server/active_record.rb
127
+ - lib/sidekiq/monitor.rb
122
128
  - lib/sidekiq/paginator.rb
123
129
  - lib/sidekiq/processor.rb
124
130
  - lib/sidekiq/rails.rb
125
131
  - lib/sidekiq/redis_connection.rb
126
132
  - lib/sidekiq/scheduled.rb
133
+ - lib/sidekiq/sd_notify.rb
134
+ - lib/sidekiq/systemd.rb
127
135
  - lib/sidekiq/testing.rb
128
136
  - lib/sidekiq/testing/inline.rb
129
137
  - lib/sidekiq/util.rb
@@ -140,6 +148,7 @@ files:
140
148
  - web/assets/images/status.png
141
149
  - web/assets/javascripts/application.js
142
150
  - web/assets/javascripts/dashboard.js
151
+ - web/assets/stylesheets/application-dark.css
143
152
  - web/assets/stylesheets/application-rtl.css
144
153
  - web/assets/stylesheets/application.css
145
154
  - web/assets/stylesheets/bootstrap-rtl.min.css
@@ -158,6 +167,7 @@ files:
158
167
  - web/locales/it.yml
159
168
  - web/locales/ja.yml
160
169
  - web/locales/ko.yml
170
+ - web/locales/lt.yml
161
171
  - web/locales/nb.yml
162
172
  - web/locales/nl.yml
163
173
  - web/locales/pl.yml
@@ -168,6 +178,7 @@ files:
168
178
  - web/locales/ta.yml
169
179
  - web/locales/uk.yml
170
180
  - web/locales/ur.yml
181
+ - web/locales/vi.yml
171
182
  - web/locales/zh-cn.yml
172
183
  - web/locales/zh-tw.yml
173
184
  - web/views/_footer.erb
@@ -200,15 +211,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
200
211
  requirements:
201
212
  - - ">="
202
213
  - !ruby/object:Gem::Version
203
- version: 2.2.2
214
+ version: 2.5.0
204
215
  required_rubygems_version: !ruby/object:Gem::Requirement
205
216
  requirements:
206
217
  - - ">="
207
218
  - !ruby/object:Gem::Version
208
219
  version: '0'
209
220
  requirements: []
210
- rubyforge_project:
211
- rubygems_version: 2.6.13
221
+ rubygems_version: 3.0.3
212
222
  signing_key:
213
223
  specification_version: 4
214
224
  summary: Simple, efficient background processing for Ruby
data/.travis.yml DELETED
@@ -1,14 +0,0 @@
1
- language: ruby
2
- sudo: false
3
- cache: bundler
4
- services:
5
- - redis-server
6
- before_install:
7
- - gem install bundler
8
- - gem update bundler
9
- rvm:
10
- - 2.2.10
11
- - 2.3.7
12
- - 2.4.4
13
- - 2.5.1
14
- - jruby-9.1.17.0
data/bin/sidekiqctl DELETED
@@ -1,99 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'fileutils'
4
-
5
- class Sidekiqctl
6
- DEFAULT_KILL_TIMEOUT = 10
7
-
8
- attr_reader :stage, :pidfile, :kill_timeout
9
-
10
- def self.print_usage
11
- puts "#{File.basename($0)} - stop a Sidekiq process from the command line."
12
- puts
13
- puts "Usage: #{File.basename($0)} <command> <pidfile> <kill_timeout>"
14
- puts " where <command> is either 'quiet' or 'stop'"
15
- puts " <pidfile> is path to a pidfile"
16
- puts " <kill_timeout> is number of seconds to wait until Sidekiq exits"
17
- puts " (default: #{Sidekiqctl::DEFAULT_KILL_TIMEOUT}), after which Sidekiq will be KILL'd"
18
- puts
19
- puts "Be sure to set the kill_timeout LONGER than Sidekiq's -t timeout. If you want"
20
- puts "to wait 60 seconds for jobs to finish, use `sidekiq -t 60` and `sidekiqctl stop"
21
- puts " path_to_pidfile 61`"
22
- puts
23
- end
24
-
25
- def initialize(stage, pidfile, timeout)
26
- @stage = stage
27
- @pidfile = pidfile
28
- @kill_timeout = timeout
29
-
30
- done('No pidfile given', :error) if !pidfile
31
- done("Pidfile #{pidfile} does not exist", :warn) if !File.exist?(pidfile)
32
- done('Invalid pidfile content', :error) if pid == 0
33
-
34
- fetch_process
35
-
36
- begin
37
- send(stage)
38
- rescue NoMethodError
39
- done "Invalid command: #{stage}", :error
40
- end
41
- end
42
-
43
- def fetch_process
44
- Process.kill(0, pid)
45
- rescue Errno::ESRCH
46
- done "Process doesn't exist", :error
47
- # We were not allowed to send a signal, but the process must have existed
48
- # when Process.kill() was called.
49
- rescue Errno::EPERM
50
- return pid
51
- end
52
-
53
- def done(msg, error = nil)
54
- puts msg
55
- exit(exit_signal(error))
56
- end
57
-
58
- def exit_signal(error)
59
- (error == :error) ? 1 : 0
60
- end
61
-
62
- def pid
63
- @pid ||= File.read(pidfile).to_i
64
- end
65
-
66
- def quiet
67
- `kill -TSTP #{pid}`
68
- end
69
-
70
- def stop
71
- `kill -TERM #{pid}`
72
- kill_timeout.times do
73
- begin
74
- Process.kill(0, pid)
75
- rescue Errno::ESRCH
76
- FileUtils.rm_f pidfile
77
- done 'Sidekiq shut down gracefully.'
78
- rescue Errno::EPERM
79
- done 'Not permitted to shut down Sidekiq.'
80
- end
81
- sleep 1
82
- end
83
- `kill -9 #{pid}`
84
- FileUtils.rm_f pidfile
85
- done 'Sidekiq shut down forcefully.'
86
- end
87
- alias_method :shutdown, :stop
88
- end
89
-
90
- if ARGV.length < 2
91
- Sidekiqctl.print_usage
92
- else
93
- stage = ARGV[0]
94
- pidfile = ARGV[1]
95
- timeout = ARGV[2].to_i
96
- timeout = Sidekiqctl::DEFAULT_KILL_TIMEOUT if timeout == 0
97
-
98
- Sidekiqctl.new(stage, pidfile, timeout)
99
- end