sidekiq 6.5.10 → 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 +568 -18
- data/README.md +66 -38
- data/bin/kiq +17 -0
- data/bin/lint-herb +13 -0
- data/bin/multi_queue_bench +271 -0
- data/bin/sidekiq +3 -8
- data/bin/sidekiqload +215 -118
- data/bin/sidekiqmon +3 -0
- data/bin/webload +69 -0
- data/lib/active_job/queue_adapters/sidekiq_adapter.rb +124 -0
- data/lib/generators/sidekiq/job_generator.rb +17 -3
- data/lib/generators/sidekiq/templates/job.rb.erb +1 -1
- data/lib/sidekiq/api.rb +526 -218
- data/lib/sidekiq/capsule.rb +135 -0
- data/lib/sidekiq/cli.rb +88 -96
- data/lib/sidekiq/client.rb +114 -47
- data/lib/sidekiq/component.rb +71 -4
- data/lib/sidekiq/config.rb +316 -0
- data/lib/sidekiq/deploy.rb +64 -0
- data/lib/sidekiq/embedded.rb +64 -0
- data/lib/sidekiq/fetch.rb +12 -14
- data/lib/sidekiq/iterable_job.rb +56 -0
- data/lib/sidekiq/job/interrupt_handler.rb +24 -0
- data/lib/sidekiq/job/iterable/active_record_enumerator.rb +53 -0
- data/lib/sidekiq/job/iterable/csv_enumerator.rb +47 -0
- data/lib/sidekiq/job/iterable/enumerators.rb +135 -0
- data/lib/sidekiq/job/iterable.rb +322 -0
- data/lib/sidekiq/job.rb +397 -10
- data/lib/sidekiq/job_logger.rb +14 -11
- data/lib/sidekiq/job_retry.rb +78 -28
- data/lib/sidekiq/job_util.rb +58 -16
- data/lib/sidekiq/launcher.rb +86 -70
- data/lib/sidekiq/loader.rb +57 -0
- data/lib/sidekiq/logger.rb +25 -94
- data/lib/sidekiq/manager.rb +11 -13
- data/lib/sidekiq/metrics/query.rb +84 -48
- data/lib/sidekiq/metrics/shared.rb +29 -14
- data/lib/sidekiq/metrics/tracking.rb +49 -30
- data/lib/sidekiq/middleware/chain.rb +19 -18
- data/lib/sidekiq/middleware/current_attributes.rb +78 -21
- data/lib/sidekiq/middleware/i18n.rb +2 -0
- data/lib/sidekiq/middleware/modules.rb +2 -0
- data/lib/sidekiq/monitor.rb +15 -5
- data/lib/sidekiq/paginator.rb +26 -4
- data/lib/sidekiq/processor.rb +78 -65
- data/lib/sidekiq/profiler.rb +73 -0
- data/lib/sidekiq/rails.rb +45 -60
- data/lib/sidekiq/redis_client_adapter.rb +35 -72
- data/lib/sidekiq/redis_connection.rb +54 -114
- data/lib/sidekiq/ring_buffer.rb +3 -0
- data/lib/sidekiq/scheduled.rb +28 -30
- data/lib/sidekiq/systemd.rb +2 -0
- data/lib/sidekiq/test_api.rb +331 -0
- data/lib/sidekiq/testing/inline.rb +2 -30
- data/lib/sidekiq/testing.rb +2 -342
- data/lib/sidekiq/transaction_aware_client.rb +23 -9
- 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 +6 -1
- data/lib/sidekiq/web/action.rb +149 -64
- data/lib/sidekiq/web/application.rb +379 -281
- data/lib/sidekiq/web/config.rb +117 -0
- data/lib/sidekiq/web/helpers.rb +190 -71
- data/lib/sidekiq/web/router.rb +62 -75
- data/lib/sidekiq/web.rb +68 -101
- data/lib/sidekiq/worker_compatibility_alias.rb +13 -0
- data/lib/sidekiq.rb +85 -269
- data/sidekiq.gemspec +15 -11
- data/web/assets/images/logo.png +0 -0
- data/web/assets/images/status.png +0 -0
- data/web/assets/javascripts/application.js +84 -24
- data/web/assets/javascripts/base-charts.js +120 -0
- data/web/assets/javascripts/chartjs-adapter-date-fns.min.js +7 -0
- data/web/assets/javascripts/dashboard-charts.js +194 -0
- data/web/assets/javascripts/dashboard.js +18 -234
- data/web/assets/javascripts/metrics.js +138 -120
- data/web/assets/stylesheets/style.css +776 -0
- data/web/locales/ar.yml +72 -70
- data/web/locales/cs.yml +64 -62
- data/web/locales/da.yml +62 -53
- data/web/locales/de.yml +67 -65
- data/web/locales/el.yml +4 -7
- data/web/locales/en.yml +89 -71
- data/web/locales/es.yml +91 -68
- data/web/locales/fa.yml +67 -65
- data/web/locales/fr.yml +82 -67
- data/web/locales/gd.yml +110 -0
- data/web/locales/he.yml +67 -64
- data/web/locales/hi.yml +95 -59
- data/web/locales/it.yml +94 -54
- data/web/locales/ja.yml +69 -70
- data/web/locales/ko.yml +54 -52
- data/web/locales/lt.yml +68 -66
- data/web/locales/nb.yml +63 -61
- data/web/locales/nl.yml +54 -52
- data/web/locales/pl.yml +47 -45
- data/web/locales/{pt-br.yml → pt-BR.yml} +81 -70
- data/web/locales/pt.yml +53 -51
- data/web/locales/ru.yml +69 -66
- data/web/locales/sv.yml +55 -53
- data/web/locales/ta.yml +100 -64
- data/web/locales/tr.yml +102 -0
- data/web/locales/uk.yml +87 -61
- data/web/locales/ur.yml +66 -64
- data/web/locales/vi.yml +69 -67
- data/web/locales/zh-CN.yml +107 -0
- data/web/locales/{zh-tw.yml → zh-TW.yml} +13 -3
- 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.html.erb +40 -0
- 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 +113 -70
- data/lib/sidekiq/delay.rb +0 -43
- data/lib/sidekiq/extensions/action_mailer.rb +0 -48
- data/lib/sidekiq/extensions/active_record.rb +0 -43
- data/lib/sidekiq/extensions/class_methods.rb +0 -43
- data/lib/sidekiq/extensions/generic_proxy.rb +0 -33
- data/lib/sidekiq/metrics/deploy.rb +0 -47
- data/lib/sidekiq/web/csrf_protection.rb +0 -180
- data/lib/sidekiq/worker.rb +0 -370
- data/web/assets/javascripts/graph.js +0 -16
- data/web/assets/stylesheets/application-dark.css +0 -143
- data/web/assets/stylesheets/application-rtl.css +0 -242
- data/web/assets/stylesheets/application.css +0 -999
- data/web/assets/stylesheets/bootstrap-rtl.min.css +0 -9
- data/web/assets/stylesheets/bootstrap.css +0 -5
- data/web/locales/zh-cn.yml +0 -93
- data/web/views/_footer.erb +0 -20
- data/web/views/_job_info.erb +0 -89
- data/web/views/_nav.erb +0 -52
- data/web/views/_paging.erb +0 -23
- data/web/views/_poll_link.erb +0 -4
- data/web/views/_status.erb +0 -4
- data/web/views/_summary.erb +0 -40
- data/web/views/busy.erb +0 -137
- data/web/views/dashboard.erb +0 -84
- data/web/views/dead.erb +0 -34
- data/web/views/layout.erb +0 -42
- data/web/views/metrics.erb +0 -69
- data/web/views/metrics_for_job.erb +0 -87
- data/web/views/morgue.erb +0 -78
- data/web/views/queue.erb +0 -59
- data/web/views/queues.erb +0 -38
- data/web/views/retries.erb +0 -83
- data/web/views/retry.erb +0 -34
- data/web/views/scheduled.erb +0 -57
- /data/{LICENSE → LICENSE.txt} +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<section>
|
|
2
|
+
<header>
|
|
3
|
+
<h1>
|
|
4
|
+
<%= t('Profiles') %>
|
|
5
|
+
<a target="blank" href="https://sidekiq.org/wiki/Profiling"><span class="info-circle" title="<%= t("ClickToLearnMore") %>">?</span></a>
|
|
6
|
+
</h1>
|
|
7
|
+
</header>
|
|
8
|
+
|
|
9
|
+
<% @profiles = Sidekiq::ProfileSet.new %>
|
|
10
|
+
<% if @profiles.size > 0 %>
|
|
11
|
+
<div class="table_container">
|
|
12
|
+
<table>
|
|
13
|
+
<thead>
|
|
14
|
+
<th><%= t('CreatedAt') %></th>
|
|
15
|
+
<th><%= t('Type') %></th>
|
|
16
|
+
<th><%= t('JID') %></th>
|
|
17
|
+
<th><%= t('Token') %></th>
|
|
18
|
+
<th><%= t('Size') %></th>
|
|
19
|
+
<th><%= t('ElapsedTime') %></th>
|
|
20
|
+
<th> </th>
|
|
21
|
+
</thead>
|
|
22
|
+
<% @profiles.each do |record| %>
|
|
23
|
+
<tr>
|
|
24
|
+
<td><%= relative_time(record.started_at) %></td>
|
|
25
|
+
<td><%= record.type %> </td>
|
|
26
|
+
<td><%= record.jid %> </td>
|
|
27
|
+
<td><%= record.token %> </td>
|
|
28
|
+
<td><%= format_memory(record.size / 1024) %> </td>
|
|
29
|
+
<td><%= number_with_delimiter(record.elapsed, precision: 2) %> </td>
|
|
30
|
+
<td>
|
|
31
|
+
<% if config[:profile_store_url] %>
|
|
32
|
+
<a target="_blank" class="btn" href="<%= root_path %>profiles/<%= CGI.escape(record.key) %>"><%= t("View") %></a>
|
|
33
|
+
<% end %>
|
|
34
|
+
<a class="btn" href="<%= root_path %>profiles/<%= CGI.escape(record.key) %>/data"><%= t("Data") %></a>
|
|
35
|
+
</td>
|
|
36
|
+
</tr>
|
|
37
|
+
<% end %>
|
|
38
|
+
</table>
|
|
39
|
+
</div>
|
|
40
|
+
<% else %>
|
|
41
|
+
<div class="alert alert-success"><%= t('NoDataFound') %></div>
|
|
42
|
+
<% end %>
|
|
43
|
+
</section>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<section>
|
|
2
|
+
<header>
|
|
3
|
+
<h1><%= t('CurrentMessagesInQueue', :queue => h(@name)) %>
|
|
4
|
+
<% if @queue.paused? %>
|
|
5
|
+
<span class="label label-danger"><%= t('Paused') %></span>
|
|
6
|
+
<% end %>
|
|
7
|
+
<span class="badge badge-secondary"><%= number_with_delimiter(@total_size) %></span>
|
|
8
|
+
</h1>
|
|
9
|
+
<%= erb :_paging, locals: { url: "#{root_path}queues/#{CGI.escape(@name)}" } %>
|
|
10
|
+
</header>
|
|
11
|
+
|
|
12
|
+
<div class="table_container">
|
|
13
|
+
<table>
|
|
14
|
+
<thead>
|
|
15
|
+
<th><a href="<%= url %>?direction=<%= url_params("direction") == 'asc' ? 'desc' : 'asc' %>"># <%= sort_direction_label %></a></th>
|
|
16
|
+
<th><%= t('Job') %></th>
|
|
17
|
+
<th><%= t('Arguments') %></th>
|
|
18
|
+
<th><%= t('Context') %></th>
|
|
19
|
+
<th><%= t('Actions') %></th>
|
|
20
|
+
</thead>
|
|
21
|
+
<% @jobs.each_with_index do |job, index| %>
|
|
22
|
+
<tr title="<%= job.jid %>">
|
|
23
|
+
<% if url_params("direction") == 'asc' %>
|
|
24
|
+
<td><%= @count * (@current_page - 1) + index + 1 %></td>
|
|
25
|
+
<% else %>
|
|
26
|
+
<td><%= @total_size - (@count * (@current_page - 1) + index) %></td>
|
|
27
|
+
<% end %>
|
|
28
|
+
<td>
|
|
29
|
+
<%= h(job.display_class) %>
|
|
30
|
+
<%= display_tags(job, nil) %>
|
|
31
|
+
</td>
|
|
32
|
+
<td>
|
|
33
|
+
<% a = job.display_args %>
|
|
34
|
+
<% if a.inspect.size > 100 %>
|
|
35
|
+
<span id="job_<%= index %>"><%= h(a.inspect[0..100]) + "... " %></span>
|
|
36
|
+
<button data-toggle="job_<%= index %>_full" class="btn btn-default btn-xs"><%= t('ShowAll') %></button>
|
|
37
|
+
<div class="toggle" id="job_<%= index %>_full"><%= display_args(a) %></div>
|
|
38
|
+
<% else %>
|
|
39
|
+
<code><%= display_args(job.display_args) %></code>
|
|
40
|
+
<% end %>
|
|
41
|
+
</td>
|
|
42
|
+
<td>
|
|
43
|
+
<%= h(job["cattr"].inspect) if job["cattr"]&.any? %>
|
|
44
|
+
</td>
|
|
45
|
+
<td>
|
|
46
|
+
<form action="<%= root_path %>queues/<%= CGI.escape(@name) %>/delete" method="post">
|
|
47
|
+
<%= csrf_tag %>
|
|
48
|
+
<input name="key_val" value="<%= h job.value %>" type="hidden">
|
|
49
|
+
<input class="btn btn-danger" type="submit" name="delete" value="<%= t('Delete') %>" data-confirm="<%= t('AreYouSure') %>">
|
|
50
|
+
</form>
|
|
51
|
+
</td>
|
|
52
|
+
</tr>
|
|
53
|
+
<% end %>
|
|
54
|
+
</table>
|
|
55
|
+
</div>
|
|
56
|
+
<%= erb :_paging, locals: { url: "#{root_path}queues/#{CGI.escape(@name)}" } %>
|
|
57
|
+
</section>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<section>
|
|
2
|
+
<header>
|
|
3
|
+
<h1><%= t('Queues') %></h1>
|
|
4
|
+
</header>
|
|
5
|
+
|
|
6
|
+
<div class="table_container">
|
|
7
|
+
<table>
|
|
8
|
+
<thead>
|
|
9
|
+
<th><%= t('Queue') %></th>
|
|
10
|
+
<th><%= t('Size') %></th>
|
|
11
|
+
<th><%= t('Latency') %></th>
|
|
12
|
+
<th><%= t('Actions') %></th>
|
|
13
|
+
</thead>
|
|
14
|
+
<% @queues.each do |queue| %>
|
|
15
|
+
<tr>
|
|
16
|
+
<td>
|
|
17
|
+
<a href="<%= root_path %>queues/<%= CGI.escape(queue.name) %>"><%= h queue.name %></a>
|
|
18
|
+
<% if queue.paused? %>
|
|
19
|
+
<span class="label label-danger"><%= t('Paused') %></span>
|
|
20
|
+
<% end %>
|
|
21
|
+
</td>
|
|
22
|
+
<td class="num"><%= number_with_delimiter(queue.size) %> </td>
|
|
23
|
+
<td class="num">
|
|
24
|
+
<% queue_latency = queue.latency %>
|
|
25
|
+
<%= (queue_latency < 60) ? '' : " (#{relative_time(Time.at(Time.now.to_f - queue_latency))})" %>
|
|
26
|
+
<%= number_with_delimiter(queue_latency, precision: 2) %>
|
|
27
|
+
</td>
|
|
28
|
+
<td class="delete-confirm">
|
|
29
|
+
<form action="<%= root_path %>queues/<%= CGI.escape(queue.name) %>" method="post">
|
|
30
|
+
<%= csrf_tag %>
|
|
31
|
+
<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)) %>">
|
|
32
|
+
|
|
33
|
+
<% if Sidekiq.pro? %>
|
|
34
|
+
<% if queue.paused? %>
|
|
35
|
+
<input class="btn btn-danger" type="submit" name="unpause" value="<%= t('Unpause') %>">
|
|
36
|
+
<% else %>
|
|
37
|
+
<input class="btn btn-danger" type="submit" name="pause" value="<%= t('Pause') %>">
|
|
38
|
+
<% end %>
|
|
39
|
+
<% end %>
|
|
40
|
+
</form>
|
|
41
|
+
</td>
|
|
42
|
+
</tr>
|
|
43
|
+
<% end %>
|
|
44
|
+
</table>
|
|
45
|
+
</div>
|
|
46
|
+
</section>
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<section>
|
|
2
|
+
<header>
|
|
3
|
+
<h1><%= t('Retries') %></h1>
|
|
4
|
+
<% if @retries.size > 0 && @total_size > @count %>
|
|
5
|
+
<%= erb :_paging, locals: { url: "#{root_path}retries" } %>
|
|
6
|
+
<% end %>
|
|
7
|
+
<%= filtering('retries') %>
|
|
8
|
+
</header>
|
|
9
|
+
|
|
10
|
+
<% if @retries.size > 0 %>
|
|
11
|
+
<form action="<%= root_path %>retries" method="post">
|
|
12
|
+
<%= csrf_tag %>
|
|
13
|
+
<div class="table_container">
|
|
14
|
+
<table>
|
|
15
|
+
<thead>
|
|
16
|
+
<tr>
|
|
17
|
+
<th>
|
|
18
|
+
<label>
|
|
19
|
+
<input type="checkbox" class="check_all check-all-items">
|
|
20
|
+
</label>
|
|
21
|
+
</th>
|
|
22
|
+
<th><%= t('NextRetry') %></th>
|
|
23
|
+
<th><%= t('RetryCount') %></th>
|
|
24
|
+
<th><%= t('Queue') %></th>
|
|
25
|
+
<th><%= t('Job') %></th>
|
|
26
|
+
<th><%= t('Arguments') %></th>
|
|
27
|
+
<th><%= t('Error') %></th>
|
|
28
|
+
</tr>
|
|
29
|
+
</thead>
|
|
30
|
+
<% @retries.each do |entry| %>
|
|
31
|
+
<tr>
|
|
32
|
+
<td>
|
|
33
|
+
<label>
|
|
34
|
+
<input type="checkbox" name="key[]" value="<%= job_params(entry.item, entry.score) %>" class="shift_clickable select-item-checkbox">
|
|
35
|
+
</label>
|
|
36
|
+
</td>
|
|
37
|
+
<td>
|
|
38
|
+
<a href="<%= root_path %>retries/<%= job_params(entry.item, entry.score) %>"><%= relative_time(entry.at) %></a>
|
|
39
|
+
</td>
|
|
40
|
+
<td><%= entry['retry_count'] %></td>
|
|
41
|
+
<td>
|
|
42
|
+
<a href="<%= root_path %>queues/<%= CGI.escape(entry.queue) %>"><%= h entry.queue %></a>
|
|
43
|
+
</td>
|
|
44
|
+
<td>
|
|
45
|
+
<%= entry.display_class %>
|
|
46
|
+
<%= display_tags(entry, "retries") %>
|
|
47
|
+
</td>
|
|
48
|
+
<td>
|
|
49
|
+
<code>
|
|
50
|
+
<div class="args"><%= display_args(entry.display_args) %></div>
|
|
51
|
+
</code>
|
|
52
|
+
</td>
|
|
53
|
+
<td>
|
|
54
|
+
<div><a href="<%= root_path %>retries/<%= job_params(entry.item, entry.score) %>"><%= h truncate("#{entry['error_class']}: #{entry['error_message']}", 200) %></a></div>
|
|
55
|
+
<% if (state = @iterable_states[entry.jid]) %>
|
|
56
|
+
<div><small>cursor=<%= h(truncate(state.cursor.inspect, 100)) %>; exec=<%= state.executions %>; rt=<%= number_with_delimiter(state.runtime, precision: 3) %>s</small></div>
|
|
57
|
+
<% end %>
|
|
58
|
+
</td>
|
|
59
|
+
</tr>
|
|
60
|
+
<% end %>
|
|
61
|
+
</table>
|
|
62
|
+
</div>
|
|
63
|
+
<div class="buttons-row">
|
|
64
|
+
<input class="btn btn-primary" type="submit" name="retry" value="<%= t('RetryNow') %>">
|
|
65
|
+
<input class="btn btn-danger" type="submit" name="delete" value="<%= t('Delete') %>">
|
|
66
|
+
<input class="btn btn-danger" type="submit" name="kill" value="<%= t('Kill') %>">
|
|
67
|
+
<!-- Retry all -->
|
|
68
|
+
<button class="btn btn-primary bulk-action-buttons bulk-lead-button" type="submit" name="action" value="retry_all" formaction="<%= "#{root_path}retries/all/retry" %>"><%= t('RetryAll') %></button>
|
|
69
|
+
<button class="btn btn-danger bulk-action-buttons" type="submit" name="action" value="delete_all" formaction="<%= "#{root_path}retries/all/delete" %>" data-confirm="<%= t('AreYouSure') %>"><%= t('DeleteAll') %></button>
|
|
70
|
+
<button class="btn btn-danger bulk-action-buttons" type="submit" name="action" value="kill_all" formaction="<%= "#{root_path}retries/all/kill" %>"><%= t('KillAll') %></button>
|
|
71
|
+
</div>
|
|
72
|
+
</form>
|
|
73
|
+
|
|
74
|
+
<% else %>
|
|
75
|
+
<div class="alert alert-success"><%= t('NoRetriesFound') %></div>
|
|
76
|
+
<% end %>
|
|
77
|
+
</section>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<%= erb :_job_info, locals: { job: @retry, type: :retry } %>
|
|
2
|
+
|
|
3
|
+
<section>
|
|
4
|
+
<header>
|
|
5
|
+
<h2><%= t('Error') %></h2>
|
|
6
|
+
</header>
|
|
7
|
+
|
|
8
|
+
<div class="table_container">
|
|
9
|
+
<table>
|
|
10
|
+
<tbody>
|
|
11
|
+
<tr>
|
|
12
|
+
<th><%= t('ErrorClass') %></th>
|
|
13
|
+
<td>
|
|
14
|
+
<code><%= h @retry['error_class'] %></code>
|
|
15
|
+
</td>
|
|
16
|
+
</tr>
|
|
17
|
+
<tr>
|
|
18
|
+
<th><%= t('ErrorMessage') %></th>
|
|
19
|
+
<td><%= h(@retry['error_message']) %></td>
|
|
20
|
+
</tr>
|
|
21
|
+
<% if @retry.error_backtrace %>
|
|
22
|
+
<tr>
|
|
23
|
+
<th><%= t('ErrorBacktrace') %></th>
|
|
24
|
+
<td>
|
|
25
|
+
<code><%= @retry.error_backtrace.join("<br/>") %></code>
|
|
26
|
+
</td>
|
|
27
|
+
</tr>
|
|
28
|
+
<% end %>
|
|
29
|
+
</tbody>
|
|
30
|
+
</table>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<form action="<%= root_path %>retries/<%= job_params(@retry, @retry.score) %>" method="post">
|
|
34
|
+
<%= csrf_tag %>
|
|
35
|
+
<a class="btn btn-default" href="<%= root_path %>retries"><%= t('GoBack') %></a>
|
|
36
|
+
<input class="btn btn-primary" type="submit" name="retry" value="<%= t('RetryNow') %>">
|
|
37
|
+
<input class="btn btn-danger" type="submit" name="delete" value="<%= t('Delete') %>">
|
|
38
|
+
</form>
|
|
39
|
+
</section>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<section>
|
|
2
|
+
<header>
|
|
3
|
+
<h1><%= t('ScheduledJobs') %></h1>
|
|
4
|
+
<% if @scheduled.size > 0 && @total_size > @count %>
|
|
5
|
+
<%= erb :_paging, locals: { url: "#{root_path}scheduled" } %>
|
|
6
|
+
<% end %>
|
|
7
|
+
<%= filtering('scheduled') %>
|
|
8
|
+
</header>
|
|
9
|
+
|
|
10
|
+
<% if @scheduled.size > 0 %>
|
|
11
|
+
<form action="<%= root_path %>scheduled" method="post">
|
|
12
|
+
<%= csrf_tag %>
|
|
13
|
+
<div class="table_container">
|
|
14
|
+
<table>
|
|
15
|
+
<thead>
|
|
16
|
+
<tr>
|
|
17
|
+
<th>
|
|
18
|
+
<label>
|
|
19
|
+
<input type="checkbox" class="check_all check-all-items">
|
|
20
|
+
</label>
|
|
21
|
+
</th>
|
|
22
|
+
<th><%= t('When') %></th>
|
|
23
|
+
<th><%= t('Queue') %></th>
|
|
24
|
+
<th><%= t('Job') %></th>
|
|
25
|
+
<th><%= t('Arguments') %></th>
|
|
26
|
+
</tr>
|
|
27
|
+
</thead>
|
|
28
|
+
<% @scheduled.each do |entry| %>
|
|
29
|
+
<tr>
|
|
30
|
+
<td>
|
|
31
|
+
<label>
|
|
32
|
+
<input type="checkbox" name="key[]" value="<%= job_params(entry.item, entry.score) %>" class="shift_clickable select-item-checkbox">
|
|
33
|
+
</label>
|
|
34
|
+
</td>
|
|
35
|
+
<td>
|
|
36
|
+
<a href="<%= root_path %>scheduled/<%= job_params(entry.item, entry.score) %>"><%= relative_time(entry.at) %></a>
|
|
37
|
+
</td>
|
|
38
|
+
<td>
|
|
39
|
+
<a href="<%= root_path %>queues/<%= CGI.escape(entry.queue) %>"><%= h entry.queue %></a>
|
|
40
|
+
</td>
|
|
41
|
+
<td>
|
|
42
|
+
<%= entry.display_class %>
|
|
43
|
+
<%= display_tags(entry, "scheduled") %>
|
|
44
|
+
</td>
|
|
45
|
+
<td>
|
|
46
|
+
<code>
|
|
47
|
+
<div class="args"><%= display_args(entry.display_args) %></div>
|
|
48
|
+
</code>
|
|
49
|
+
</td>
|
|
50
|
+
</tr>
|
|
51
|
+
<% end %>
|
|
52
|
+
</table>
|
|
53
|
+
</div>
|
|
54
|
+
<div class="buttons-row">
|
|
55
|
+
<input class="btn btn-danger" type="submit" name="delete" value="<%= t('Delete') %>">
|
|
56
|
+
<input class="btn btn-danger" type="submit" name="add_to_queue" value="<%= t('AddToQueue') %>">
|
|
57
|
+
<button class="btn btn-danger bulk-action-buttons bulk-lead-button" type="submit" name="action" value="delete_all" formaction="<%= "#{root_path}scheduled/all/delete" %>" data-confirm="<%= t('AreYouSure') %>"><%= t('DeleteAll') %></button>
|
|
58
|
+
<button class="btn btn-danger bulk-action-buttons" type="submit" name="action" value="add_all_to_queue" formaction="<%= "#{root_path}scheduled/all/add_to_queue" %>"><%= t('AddAllToQueue') %></button>
|
|
59
|
+
</div>
|
|
60
|
+
</form>
|
|
61
|
+
<% else %>
|
|
62
|
+
<div class="alert alert-success"><%= t('NoScheduledFound') %></div>
|
|
63
|
+
<% end %>
|
|
64
|
+
</section>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<%= erb :_job_info, locals: { job: @job, type: :scheduled } %>
|
|
2
2
|
|
|
3
|
-
<form
|
|
3
|
+
<form action="<%= root_path %>scheduled/<%= job_params(@job, @job.score) %>" method="post">
|
|
4
4
|
<%= csrf_tag %>
|
|
5
5
|
<a class="btn btn-default" href="<%= root_path %>scheduled"><%= t('GoBack') %></a>
|
|
6
|
-
<input class="btn btn-primary" type="submit" name="add_to_queue" value="<%= t('AddToQueue') %>"
|
|
7
|
-
<input class="btn btn-danger" type="submit" name="delete" value="<%= t('Delete') %>"
|
|
6
|
+
<input class="btn btn-primary" type="submit" name="add_to_queue" value="<%= t('AddToQueue') %>">
|
|
7
|
+
<input class="btn btn-danger" type="submit" name="delete" value="<%= t('Delete') %>">
|
|
8
8
|
</form>
|