sidekiq 7.3.9 → 8.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Changes.md +225 -0
- data/README.md +34 -14
- data/bin/kiq +17 -0
- data/bin/lint-herb +13 -0
- data/bin/sidekiqload +12 -10
- data/bin/webload +69 -0
- data/lib/active_job/queue_adapters/sidekiq_adapter.rb +107 -58
- data/lib/generators/sidekiq/job_generator.rb +15 -3
- data/lib/generators/sidekiq/templates/job.rb.erb +1 -1
- data/lib/sidekiq/api.rb +310 -83
- data/lib/sidekiq/capsule.rb +10 -7
- data/lib/sidekiq/cli.rb +31 -24
- data/lib/sidekiq/client.rb +36 -18
- data/lib/sidekiq/component.rb +45 -3
- data/lib/sidekiq/config.rb +35 -30
- data/lib/sidekiq/embedded.rb +2 -1
- data/lib/sidekiq/fetch.rb +1 -0
- data/lib/sidekiq/iterable_job.rb +1 -0
- data/lib/sidekiq/job/iterable.rb +46 -18
- data/lib/sidekiq/job.rb +18 -3
- data/lib/sidekiq/job_logger.rb +8 -6
- data/lib/sidekiq/job_retry.rb +45 -18
- data/lib/sidekiq/job_util.rb +5 -1
- data/lib/sidekiq/launcher.rb +22 -12
- data/lib/sidekiq/loader.rb +57 -0
- data/lib/sidekiq/logger.rb +25 -69
- data/lib/sidekiq/manager.rb +2 -2
- data/lib/sidekiq/metrics/query.rb +77 -46
- data/lib/sidekiq/metrics/shared.rb +8 -5
- data/lib/sidekiq/metrics/tracking.rb +12 -7
- data/lib/sidekiq/middleware/current_attributes.rb +11 -19
- data/lib/sidekiq/middleware/i18n.rb +2 -0
- data/lib/sidekiq/monitor.rb +4 -8
- data/lib/sidekiq/paginator.rb +18 -2
- data/lib/sidekiq/processor.rb +26 -18
- data/lib/sidekiq/profiler.rb +73 -0
- data/lib/sidekiq/rails.rb +46 -67
- data/lib/sidekiq/redis_client_adapter.rb +6 -3
- data/lib/sidekiq/redis_connection.rb +16 -5
- data/lib/sidekiq/ring_buffer.rb +1 -0
- data/lib/sidekiq/scheduled.rb +6 -7
- data/lib/sidekiq/test_api.rb +331 -0
- data/lib/sidekiq/testing/inline.rb +2 -30
- data/lib/sidekiq/testing.rb +2 -333
- data/lib/sidekiq/transaction_aware_client.rb +13 -5
- data/lib/sidekiq/tui/controls.rb +53 -0
- data/lib/sidekiq/tui/filtering.rb +53 -0
- data/lib/sidekiq/tui/tabs/base_tab.rb +230 -0
- data/lib/sidekiq/tui/tabs/busy.rb +104 -0
- data/lib/sidekiq/tui/tabs/dead.rb +14 -0
- data/lib/sidekiq/tui/tabs/home.rb +115 -0
- data/lib/sidekiq/tui/tabs/metrics.rb +114 -0
- data/lib/sidekiq/tui/tabs/queues.rb +83 -0
- data/lib/sidekiq/tui/tabs/retries.rb +14 -0
- data/lib/sidekiq/tui/tabs/scheduled.rb +14 -0
- data/lib/sidekiq/tui/tabs/set_tab.rb +91 -0
- data/lib/sidekiq/tui/tabs.rb +15 -0
- data/lib/sidekiq/tui.rb +390 -0
- data/lib/sidekiq/version.rb +2 -2
- data/lib/sidekiq/web/action.rb +146 -83
- data/lib/sidekiq/web/application.rb +372 -328
- data/lib/sidekiq/web/config.rb +117 -0
- data/lib/sidekiq/web/helpers.rb +102 -44
- data/lib/sidekiq/web/router.rb +61 -77
- data/lib/sidekiq/web.rb +65 -151
- data/lib/sidekiq.rb +13 -1
- data/sidekiq.gemspec +9 -8
- data/web/assets/images/logo.png +0 -0
- data/web/assets/images/status.png +0 -0
- data/web/assets/javascripts/application.js +43 -27
- data/web/assets/javascripts/base-charts.js +30 -16
- data/web/assets/javascripts/chartjs-adapter-date-fns.min.js +7 -0
- data/web/assets/javascripts/dashboard.js +1 -1
- data/web/assets/javascripts/metrics.js +16 -34
- data/web/assets/stylesheets/style.css +776 -0
- data/web/locales/ar.yml +3 -1
- data/web/locales/cs.yml +2 -0
- data/web/locales/da.yml +2 -0
- data/web/locales/de.yml +2 -0
- data/web/locales/el.yml +2 -0
- data/web/locales/en.yml +8 -0
- data/web/locales/es.yml +25 -2
- data/web/locales/fa.yml +3 -1
- data/web/locales/fr.yml +3 -1
- data/web/locales/gd.yml +13 -1
- data/web/locales/he.yml +3 -1
- data/web/locales/hi.yml +36 -0
- data/web/locales/it.yml +9 -0
- data/web/locales/ja.yml +2 -0
- data/web/locales/ko.yml +2 -0
- data/web/locales/lt.yml +2 -0
- data/web/locales/nb.yml +2 -0
- data/web/locales/nl.yml +2 -0
- data/web/locales/pl.yml +2 -0
- data/web/locales/{pt-br.yml → pt-BR.yml} +3 -1
- data/web/locales/pt.yml +2 -0
- data/web/locales/ru.yml +2 -0
- data/web/locales/sv.yml +2 -0
- data/web/locales/ta.yml +83 -47
- data/web/locales/tr.yml +2 -0
- data/web/locales/uk.yml +7 -5
- data/web/locales/ur.yml +3 -1
- data/web/locales/vi.yml +2 -0
- data/web/locales/{zh-cn.yml → zh-CN.yml} +86 -73
- data/web/locales/{zh-tw.yml → zh-TW.yml} +3 -1
- data/web/views/_footer.html.erb +32 -0
- data/web/views/_job_info.html.erb +115 -0
- data/web/views/_metrics_period_select.html.erb +15 -0
- data/web/views/_nav.html.erb +45 -0
- data/web/views/_paging.html.erb +26 -0
- data/web/views/_poll_link.html.erb +4 -0
- data/web/views/{_summary.erb → _summary.html.erb} +16 -16
- data/web/views/busy.html.erb +155 -0
- data/web/views/dashboard.html.erb +104 -0
- data/web/views/dead.html.erb +38 -0
- data/web/views/filtering.html.erb +6 -0
- data/web/views/layout.html.erb +26 -0
- data/web/views/metrics.html.erb +85 -0
- data/web/views/metrics_for_job.html.erb +58 -0
- data/web/views/morgue.html.erb +69 -0
- data/web/views/profiles.html.erb +43 -0
- data/web/views/queue.html.erb +57 -0
- data/web/views/queues.html.erb +46 -0
- data/web/views/retries.html.erb +77 -0
- data/web/views/retry.html.erb +39 -0
- data/web/views/scheduled.html.erb +64 -0
- data/web/views/{scheduled_job_info.erb → scheduled_job_info.html.erb} +3 -3
- metadata +65 -47
- data/lib/sidekiq/web/csrf_protection.rb +0 -183
- data/web/assets/stylesheets/application-dark.css +0 -147
- data/web/assets/stylesheets/application-rtl.css +0 -163
- data/web/assets/stylesheets/application.css +0 -759
- data/web/assets/stylesheets/bootstrap-rtl.min.css +0 -9
- data/web/assets/stylesheets/bootstrap.css +0 -5
- data/web/views/_footer.erb +0 -34
- data/web/views/_job_info.erb +0 -105
- data/web/views/_metrics_period_select.erb +0 -12
- data/web/views/_nav.erb +0 -52
- data/web/views/_paging.erb +0 -25
- data/web/views/_poll_link.erb +0 -4
- data/web/views/_status.erb +0 -4
- data/web/views/busy.erb +0 -148
- data/web/views/dashboard.erb +0 -108
- data/web/views/dead.erb +0 -34
- data/web/views/filtering.erb +0 -6
- data/web/views/layout.erb +0 -42
- data/web/views/metrics.erb +0 -90
- data/web/views/metrics_for_job.erb +0 -59
- data/web/views/morgue.erb +0 -74
- data/web/views/queue.erb +0 -55
- data/web/views/queues.erb +0 -44
- data/web/views/retries.erb +0 -79
- data/web/views/retry.erb +0 -34
- data/web/views/scheduled.erb +0 -56
data/web/views/queues.erb
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
<div class="header-container">
|
|
2
|
-
<h1><%= t('Queues') %></h1>
|
|
3
|
-
</div>
|
|
4
|
-
|
|
5
|
-
<div class="table_container">
|
|
6
|
-
<table class="queues table table-hover table-bordered table-striped">
|
|
7
|
-
<thead>
|
|
8
|
-
<th><%= t('Queue') %></th>
|
|
9
|
-
<th><%= t('Size') %></th>
|
|
10
|
-
<th><%= t('Latency') %></th>
|
|
11
|
-
<th><%= t('Actions') %></th>
|
|
12
|
-
</thead>
|
|
13
|
-
<% @queues.each do |queue| %>
|
|
14
|
-
<tr>
|
|
15
|
-
<td>
|
|
16
|
-
<a href="<%= root_path %>queues/<%= CGI.escape(queue.name) %>"><%= h queue.name %></a>
|
|
17
|
-
<% if queue.paused? %>
|
|
18
|
-
<span class="label label-danger"><%= t('Paused') %></span>
|
|
19
|
-
<% end %>
|
|
20
|
-
</td>
|
|
21
|
-
<td class="num"><%= number_with_delimiter(queue.size) %> </td>
|
|
22
|
-
<td class="num">
|
|
23
|
-
<% queue_latency = queue.latency %>
|
|
24
|
-
<%= (queue_latency < 60) ? '' : " (#{relative_time(Time.at(Time.now.to_f - queue_latency))})" %>
|
|
25
|
-
<%= number_with_delimiter(queue_latency, precision: 2) %>
|
|
26
|
-
</td>
|
|
27
|
-
<td class="delete-confirm">
|
|
28
|
-
<form action="<%=root_path %>queues/<%= CGI.escape(queue.name) %>" method="post">
|
|
29
|
-
<%= csrf_tag %>
|
|
30
|
-
<input class="btn btn-danger" type="submit" name="delete" title="This will delete all jobs within the queue, it will reappear if you push more jobs to it in the future." value="<%= t('Delete') %>" data-confirm="<%= t('AreYouSureDeleteQueue', :queue => h(queue.name)) %>" />
|
|
31
|
-
|
|
32
|
-
<% if Sidekiq.pro? %>
|
|
33
|
-
<% if queue.paused? %>
|
|
34
|
-
<input class="btn btn-danger" type="submit" name="unpause" value="<%= t('Unpause') %>" />
|
|
35
|
-
<% else %>
|
|
36
|
-
<input class="btn btn-danger" type="submit" name="pause" value="<%= t('Pause') %>" />
|
|
37
|
-
<% end %>
|
|
38
|
-
<% end %>
|
|
39
|
-
</form>
|
|
40
|
-
</td>
|
|
41
|
-
</tr>
|
|
42
|
-
<% end %>
|
|
43
|
-
</table>
|
|
44
|
-
</div>
|
data/web/views/retries.erb
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
<div class="header-container">
|
|
2
|
-
<h1><%= t('Retries') %></h1>
|
|
3
|
-
<% if @retries.size > 0 && @total_size > @count %>
|
|
4
|
-
<%= erb :_paging, locals: { url: "#{root_path}retries" } %>
|
|
5
|
-
<% end %>
|
|
6
|
-
<%= filtering('retries') %>
|
|
7
|
-
</div>
|
|
8
|
-
|
|
9
|
-
<% if @retries.size > 0 %>
|
|
10
|
-
<form action="<%= root_path %>retries" method="post">
|
|
11
|
-
<%= csrf_tag %>
|
|
12
|
-
<div class="table_container">
|
|
13
|
-
<table class="table table-striped table-bordered table-hover">
|
|
14
|
-
<thead>
|
|
15
|
-
<tr>
|
|
16
|
-
<th class="table-checkbox checkbox-column">
|
|
17
|
-
<label>
|
|
18
|
-
<input type="checkbox" class="check_all" />
|
|
19
|
-
</label>
|
|
20
|
-
</th>
|
|
21
|
-
<th><%= t('NextRetry') %></th>
|
|
22
|
-
<th><%= t('RetryCount') %></th>
|
|
23
|
-
<th><%= t('Queue') %></th>
|
|
24
|
-
<th><%= t('Job') %></th>
|
|
25
|
-
<th><%= t('Arguments') %></th>
|
|
26
|
-
<th><%= t('Error') %></th>
|
|
27
|
-
</tr>
|
|
28
|
-
</thead>
|
|
29
|
-
<% @retries.each do |entry| %>
|
|
30
|
-
<tr>
|
|
31
|
-
<td class="table-checkbox">
|
|
32
|
-
<label>
|
|
33
|
-
<input type='checkbox' name='key[]' value='<%= job_params(entry.item, entry.score) %>' class='shift_clickable' />
|
|
34
|
-
</label>
|
|
35
|
-
</td>
|
|
36
|
-
<td>
|
|
37
|
-
<a href="<%= root_path %>retries/<%= job_params(entry.item, entry.score) %>"><%= relative_time(entry.at) %></a>
|
|
38
|
-
</td>
|
|
39
|
-
<td><%= entry['retry_count'] %></td>
|
|
40
|
-
<td>
|
|
41
|
-
<a href="<%= root_path %>queues/<%= entry.queue %>"><%= entry.queue %></a>
|
|
42
|
-
</td>
|
|
43
|
-
<td>
|
|
44
|
-
<%= entry.display_class %>
|
|
45
|
-
<%= display_tags(entry, "retries") %>
|
|
46
|
-
</td>
|
|
47
|
-
<td>
|
|
48
|
-
<div class="args"><%= display_args(entry.display_args) %></div>
|
|
49
|
-
</td>
|
|
50
|
-
<td>
|
|
51
|
-
<div><%= h truncate("#{entry['error_class']}: #{entry['error_message']}", 200) %></div>
|
|
52
|
-
</td>
|
|
53
|
-
</tr>
|
|
54
|
-
<% end %>
|
|
55
|
-
</table>
|
|
56
|
-
</div>
|
|
57
|
-
<input class="btn btn-primary pull-left flip" type="submit" name="retry" value="<%= t('RetryNow') %>" />
|
|
58
|
-
<input class="btn btn-danger pull-left flip" type="submit" name="delete" value="<%= t('Delete') %>" />
|
|
59
|
-
<input class="btn btn-danger pull-left flip" type="submit" name="kill" value="<%= t('Kill') %>" />
|
|
60
|
-
</form>
|
|
61
|
-
|
|
62
|
-
<% unfiltered? do %>
|
|
63
|
-
<form action="<%= root_path %>retries/all/delete" method="post">
|
|
64
|
-
<%= csrf_tag %>
|
|
65
|
-
<input class="btn btn-danger pull-right flip" type="submit" name="delete" value="<%= t('DeleteAll') %>" data-confirm="<%= t('AreYouSure') %>" />
|
|
66
|
-
</form>
|
|
67
|
-
<form action="<%= root_path %>retries/all/retry" method="post">
|
|
68
|
-
<%= csrf_tag %>
|
|
69
|
-
<input class="btn btn-danger pull-right flip" type="submit" name="retry" value="<%= t('RetryAll') %>" data-confirm="<%= t('AreYouSure') %>" />
|
|
70
|
-
</form>
|
|
71
|
-
<form action="<%= root_path %>retries/all/kill" method="post">
|
|
72
|
-
<%= csrf_tag %>
|
|
73
|
-
<input class="btn btn-danger pull-right flip" type="submit" name="kill" value="<%= t('KillAll') %>" data-confirm="<%= t('AreYouSure') %>" />
|
|
74
|
-
</form>
|
|
75
|
-
<% end %>
|
|
76
|
-
|
|
77
|
-
<% else %>
|
|
78
|
-
<div class="alert alert-success"><%= t('NoRetriesFound') %></div>
|
|
79
|
-
<% end %>
|
data/web/views/retry.erb
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<%= erb :_job_info, locals: { job: @retry, type: :retry } %>
|
|
2
|
-
|
|
3
|
-
<h3><%= t('Error') %></h3>
|
|
4
|
-
<div class="table_container">
|
|
5
|
-
<table class="error table table-bordered table-striped table-hover">
|
|
6
|
-
<tbody>
|
|
7
|
-
<tr>
|
|
8
|
-
<th><%= t('ErrorClass') %></th>
|
|
9
|
-
<td>
|
|
10
|
-
<code><%= h @retry['error_class'] %></code>
|
|
11
|
-
</td>
|
|
12
|
-
</tr>
|
|
13
|
-
<tr>
|
|
14
|
-
<th><%= t('ErrorMessage') %></th>
|
|
15
|
-
<td><%= h(@retry['error_message']) %></td>
|
|
16
|
-
</tr>
|
|
17
|
-
<% if @retry.error_backtrace %>
|
|
18
|
-
<tr>
|
|
19
|
-
<th><%= t('ErrorBacktrace') %></th>
|
|
20
|
-
<td>
|
|
21
|
-
<code><%= @retry.error_backtrace.join("<br/>") %></code>
|
|
22
|
-
</td>
|
|
23
|
-
</tr>
|
|
24
|
-
<% end %>
|
|
25
|
-
</tbody>
|
|
26
|
-
</table>
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
|
-
<form class="form-horizontal" action="<%= root_path %>retries/<%= job_params(@retry, @retry.score) %>" method="post">
|
|
30
|
-
<%= csrf_tag %>
|
|
31
|
-
<a class="btn btn-default" href="<%= root_path %>retries"><%= t('GoBack') %></a>
|
|
32
|
-
<input class="btn btn-primary" type="submit" name="retry" value="<%= t('RetryNow') %>" />
|
|
33
|
-
<input class="btn btn-danger" type="submit" name="delete" value="<%= t('Delete') %>" />
|
|
34
|
-
</form>
|
data/web/views/scheduled.erb
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
<div class="header-container">
|
|
2
|
-
<h1><%= t('ScheduledJobs') %></h1>
|
|
3
|
-
<% if @scheduled.size > 0 && @total_size > @count %>
|
|
4
|
-
<%= erb :_paging, locals: { url: "#{root_path}scheduled" } %>
|
|
5
|
-
<% end %>
|
|
6
|
-
<%= filtering('scheduled') %>
|
|
7
|
-
</div>
|
|
8
|
-
|
|
9
|
-
<% if @scheduled.size > 0 %>
|
|
10
|
-
<form action="<%= root_path %>scheduled" method="post">
|
|
11
|
-
<%= csrf_tag %>
|
|
12
|
-
<div class="table_container">
|
|
13
|
-
<table class="table table-striped table-bordered table-hover">
|
|
14
|
-
<thead>
|
|
15
|
-
<tr>
|
|
16
|
-
<th class="table-checkbox checkbox-column">
|
|
17
|
-
<label>
|
|
18
|
-
<input type="checkbox" class="check_all" />
|
|
19
|
-
</label>
|
|
20
|
-
</th>
|
|
21
|
-
<th><%= t('When') %></th>
|
|
22
|
-
<th><%= t('Queue') %></th>
|
|
23
|
-
<th><%= t('Job') %></th>
|
|
24
|
-
<th><%= t('Arguments') %></th>
|
|
25
|
-
</tr>
|
|
26
|
-
</thead>
|
|
27
|
-
<% @scheduled.each do |entry| %>
|
|
28
|
-
<tr>
|
|
29
|
-
<td class="table-checkbox">
|
|
30
|
-
<label>
|
|
31
|
-
<input type='checkbox' name='key[]' value='<%= job_params(entry.item, entry.score) %>' class='shift_clickable' />
|
|
32
|
-
</label>
|
|
33
|
-
</td>
|
|
34
|
-
<td>
|
|
35
|
-
<a href="<%= root_path %>scheduled/<%= job_params(entry.item, entry.score) %>"><%= relative_time(entry.at) %></a>
|
|
36
|
-
</td>
|
|
37
|
-
<td>
|
|
38
|
-
<a href="<%= root_path %>queues/<%= entry.queue %>"><%= entry.queue %></a>
|
|
39
|
-
</td>
|
|
40
|
-
<td>
|
|
41
|
-
<%= entry.display_class %>
|
|
42
|
-
<%= display_tags(entry, "scheduled") %>
|
|
43
|
-
</td>
|
|
44
|
-
<td>
|
|
45
|
-
<div class="args"><%= display_args(entry.display_args) %></div>
|
|
46
|
-
</td>
|
|
47
|
-
</tr>
|
|
48
|
-
<% end %>
|
|
49
|
-
</table>
|
|
50
|
-
</div>
|
|
51
|
-
<input class="btn btn-danger pull-right flip" type="submit" name="delete" value="<%= t('Delete') %>" />
|
|
52
|
-
<input class="btn btn-danger pull-right flip" type="submit" name="add_to_queue" value="<%= t('AddToQueue') %>" />
|
|
53
|
-
</form>
|
|
54
|
-
<% else %>
|
|
55
|
-
<div class="alert alert-success"><%= t('NoScheduledFound') %></div>
|
|
56
|
-
<% end %>
|