sidekiq 3.3.4 → 3.4.0
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.
- checksums.yaml +4 -4
- data/3.0-Upgrade.md +1 -1
- data/Changes.md +18 -1
- data/Gemfile +1 -1
- data/Pro-Changes.md +17 -2
- data/lib/sidekiq.rb +19 -3
- data/lib/sidekiq/api.rb +5 -1
- data/lib/sidekiq/cli.rb +6 -2
- data/lib/sidekiq/client.rb +6 -2
- data/lib/sidekiq/exception_handler.rb +1 -1
- data/lib/sidekiq/logging.rb +7 -1
- data/lib/sidekiq/manager.rb +15 -9
- data/lib/sidekiq/processor.rb +6 -2
- data/lib/sidekiq/scheduled.rb +21 -15
- data/lib/sidekiq/testing.rb +2 -0
- data/lib/sidekiq/util.rb +4 -2
- data/lib/sidekiq/version.rb +1 -1
- data/lib/sidekiq/web.rb +2 -2
- data/lib/sidekiq/web_helpers.rb +1 -0
- data/test/test_manager.rb +3 -1
- data/test/test_scheduled.rb +49 -15
- data/test/test_scheduling.rb +9 -0
- data/test/test_sidekiq.rb +1 -1
- data/test/test_web_helpers.rb +6 -0
- data/web/assets/javascripts/application.js +2 -0
- data/web/assets/stylesheets/application.css +34 -8
- data/web/views/_job_info.erb +68 -66
- data/web/views/_nav.erb +0 -1
- data/web/views/busy.erb +66 -62
- data/web/views/dead.erb +21 -18
- data/web/views/morgue.erb +40 -38
- data/web/views/queue.erb +31 -29
- data/web/views/queues.erb +25 -23
- data/web/views/retries.erb +42 -40
- data/web/views/retry.erb +21 -18
- data/web/views/scheduled.erb +32 -30
- metadata +2 -2
data/web/views/dead.erb
CHANGED
@@ -1,28 +1,31 @@
|
|
1
1
|
<%= erb :_job_info, :locals => {:job => @dead, :type => :dead} %>
|
2
2
|
|
3
3
|
<h3><%= t('Error') %></h3>
|
4
|
-
<
|
5
|
-
<
|
6
|
-
<
|
7
|
-
<th><%= t('ErrorClass') %></th>
|
8
|
-
<td>
|
9
|
-
<code><%= @dead['error_class'] %></code>
|
10
|
-
</td>
|
11
|
-
</tr>
|
12
|
-
<tr>
|
13
|
-
<th><%= t('ErrorMessage') %></th>
|
14
|
-
<td><%= h(@dead['error_message']) %></td>
|
15
|
-
</tr>
|
16
|
-
<% if !@dead['error_backtrace'].nil? %>
|
4
|
+
<div class="table_container">
|
5
|
+
<table class="error table table-bordered table-striped">
|
6
|
+
<tbody>
|
17
7
|
<tr>
|
18
|
-
<th><%= t('
|
8
|
+
<th><%= t('ErrorClass') %></th>
|
19
9
|
<td>
|
20
|
-
<code><%= @dead['
|
10
|
+
<code><%= @dead['error_class'] %></code>
|
21
11
|
</td>
|
22
12
|
</tr>
|
23
|
-
|
24
|
-
|
25
|
-
|
13
|
+
<tr>
|
14
|
+
<th><%= t('ErrorMessage') %></th>
|
15
|
+
<td><%= h(@dead['error_message']) %></td>
|
16
|
+
</tr>
|
17
|
+
<% if !@dead['error_backtrace'].nil? %>
|
18
|
+
<tr>
|
19
|
+
<th><%= t('ErrorBacktrace') %></th>
|
20
|
+
<td>
|
21
|
+
<code><%= @dead['error_backtrace'].join("<br/>") %></code>
|
22
|
+
</td>
|
23
|
+
</tr>
|
24
|
+
<% end %>
|
25
|
+
</tbody>
|
26
|
+
</table>
|
27
|
+
</div>
|
28
|
+
|
26
29
|
<form class="form-horizontal" action="<%= root_path %>morgue/<%= job_params(@dead, @dead.score) %>" method="post">
|
27
30
|
<a class="btn btn-default" href="<%= root_path %>morgue"><%= t('GoBack') %></a>
|
28
31
|
<input class="btn btn-primary" type="submit" name="retry" value="<%= t('RetryNow') %>" />
|
data/web/views/morgue.erb
CHANGED
@@ -12,44 +12,46 @@
|
|
12
12
|
|
13
13
|
<% if @dead.size > 0 %>
|
14
14
|
<form action="<%= root_path %>morgue" method="post">
|
15
|
-
<
|
16
|
-
<
|
17
|
-
<
|
18
|
-
<
|
19
|
-
<
|
20
|
-
<
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
<
|
33
|
-
<
|
34
|
-
<
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
<
|
39
|
-
|
40
|
-
|
41
|
-
<
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
<
|
46
|
-
|
47
|
-
|
48
|
-
<
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
15
|
+
<div class="table_container">
|
16
|
+
<table class="table table-striped table-bordered table-white">
|
17
|
+
<thead>
|
18
|
+
<tr>
|
19
|
+
<th width="20px" class="table-checkbox">
|
20
|
+
<label>
|
21
|
+
<input type="checkbox" class="check_all" />
|
22
|
+
</label>
|
23
|
+
</th>
|
24
|
+
<th><%= t('LastRetry') %></th>
|
25
|
+
<th><%= t('Queue') %></th>
|
26
|
+
<th><%= t('Job') %></th>
|
27
|
+
<th><%= t('Arguments') %></th>
|
28
|
+
<th><%= t('Error') %></th>
|
29
|
+
</tr>
|
30
|
+
</thead>
|
31
|
+
<% @dead.each do |entry| %>
|
32
|
+
<tr>
|
33
|
+
<td class="table-checkbox">
|
34
|
+
<label>
|
35
|
+
<input type='checkbox' name='key[]' value='<%= job_params(entry.item, entry.score) %>' />
|
36
|
+
</label>
|
37
|
+
</td>
|
38
|
+
<td>
|
39
|
+
<a href="<%= root_path %>morgue/<%= job_params(entry.item, entry.score) %>"><%= relative_time(entry.at) %></a>
|
40
|
+
</td>
|
41
|
+
<td>
|
42
|
+
<a href="<%= root_path %>queues/<%= entry.queue %>"><%= entry.queue %></a>
|
43
|
+
</td>
|
44
|
+
<td><%= entry.display_class %></td>
|
45
|
+
<td>
|
46
|
+
<div class="args"><%= display_args(entry.display_args) %></div>
|
47
|
+
</td>
|
48
|
+
<td>
|
49
|
+
<div><%= h truncate("#{entry['error_class']}: #{entry['error_message']}", 200) %></div>
|
50
|
+
</td>
|
51
|
+
</tr>
|
52
|
+
<% end %>
|
53
|
+
</table>
|
54
|
+
</div>
|
53
55
|
<input class="btn btn-primary btn-xs pull-left" type="submit" name="retry" value="<%= t('RetryNow') %>" />
|
54
56
|
<input class="btn btn-danger btn-xs pull-left" type="submit" name="delete" value="<%= t('Delete') %>" />
|
55
57
|
</form>
|
data/web/views/queue.erb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<header class="row">
|
2
2
|
<div class="col-sm-5">
|
3
3
|
<h3>
|
4
|
-
<%= t('CurrentMessagesInQueue', :queue => @name) %>
|
4
|
+
<%= t('CurrentMessagesInQueue', :queue => h(@name)) %>
|
5
5
|
<% if @queue.paused? %>
|
6
6
|
<span class="label label-danger"><%= t('Paused') %></span>
|
7
7
|
<% end %>
|
@@ -11,32 +11,34 @@
|
|
11
11
|
<%= erb :_paging, :locals => { :url => "#{root_path}queues/#{@name}" } %>
|
12
12
|
</div>
|
13
13
|
</header>
|
14
|
-
<
|
15
|
-
<
|
16
|
-
<
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
<
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
<
|
35
|
-
<
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
14
|
+
<div class="table_container">
|
15
|
+
<table class="queue table table-hover table-bordered table-striped">
|
16
|
+
<thead>
|
17
|
+
<th><%= t('Job') %></th>
|
18
|
+
<th><%= t('Arguments') %></th>
|
19
|
+
<th></th>
|
20
|
+
</thead>
|
21
|
+
<% @messages.each_with_index do |msg, index| %>
|
22
|
+
<tr>
|
23
|
+
<td><%= h(msg.display_class) %></td>
|
24
|
+
<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>
|
30
|
+
<% else %>
|
31
|
+
<%= h(msg.display_args) %>
|
32
|
+
<% end %>
|
33
|
+
</td>
|
34
|
+
<td>
|
35
|
+
<form action="<%= root_path %>queues/<%= @name %>/delete" method="post">
|
36
|
+
<input name="key_val" value="<%= h Sidekiq.dump_json(msg.item) %>" type="hidden" />
|
37
|
+
<input class="btn btn-danger btn-xs" type="submit" name="delete" value="<%= t('Delete') %>" data-confirm="<%= t('AreYouSure') %>" />
|
38
|
+
</form>
|
39
|
+
</td>
|
40
|
+
</tr>
|
41
|
+
<% end %>
|
42
|
+
</table>
|
43
|
+
</div>
|
42
44
|
<%= erb :_paging, :locals => { :url => "#{root_path}queues/#{@name}" } %>
|
data/web/views/queues.erb
CHANGED
@@ -1,25 +1,27 @@
|
|
1
1
|
<h3><%= t('Queues') %></h3>
|
2
2
|
|
3
|
-
<
|
4
|
-
<
|
5
|
-
<
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
<
|
12
|
-
<
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
<
|
20
|
-
<
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
3
|
+
<div class="table_container">
|
4
|
+
<table class="queues table table-hover table-bordered table-striped table-white">
|
5
|
+
<thead>
|
6
|
+
<th><%= t('Queue') %></th>
|
7
|
+
<th><%= t('Size') %></th>
|
8
|
+
<th><%= t('Actions') %></th>
|
9
|
+
</thead>
|
10
|
+
<% @queues.each do |queue| %>
|
11
|
+
<tr>
|
12
|
+
<td>
|
13
|
+
<a href="<%= root_path %>queues/<%= queue.name %>"><%= queue.name %></a>
|
14
|
+
<% if queue.paused? %>
|
15
|
+
<span class="label label-danger"><%= t('Paused') %></span>
|
16
|
+
<% end %>
|
17
|
+
</td>
|
18
|
+
<td><%= number_with_delimiter(queue.size) %> </td>
|
19
|
+
<td width="20%">
|
20
|
+
<form action="<%=root_path %>queues/<%= queue.name %>" method="post">
|
21
|
+
<input class="btn btn-danger btn-xs" type="submit" name="delete" value="<%= t('Delete') %>" data-confirm="<%= t('AreYouSureDeleteQueue', :queue => h(queue.name)) %>" />
|
22
|
+
</form>
|
23
|
+
</td>
|
24
|
+
</tr>
|
25
|
+
<% end %>
|
26
|
+
</table>
|
27
|
+
</div>
|
data/web/views/retries.erb
CHANGED
@@ -12,46 +12,48 @@
|
|
12
12
|
|
13
13
|
<% if @retries.size > 0 %>
|
14
14
|
<form action="<%= root_path %>retries" method="post">
|
15
|
-
<
|
16
|
-
<
|
17
|
-
<
|
18
|
-
<
|
19
|
-
<
|
20
|
-
<
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
<
|
34
|
-
<
|
35
|
-
<
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
<
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
<
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
<
|
48
|
-
|
49
|
-
|
50
|
-
<
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
15
|
+
<div class="table_container">
|
16
|
+
<table class="table table-striped table-bordered table-white">
|
17
|
+
<thead>
|
18
|
+
<tr>
|
19
|
+
<th width="20px" class="table-checkbox">
|
20
|
+
<label>
|
21
|
+
<input type="checkbox" class="check_all" />
|
22
|
+
</label>
|
23
|
+
</th>
|
24
|
+
<th><%= t('NextRetry') %></th>
|
25
|
+
<th><%= t('RetryCount') %></th>
|
26
|
+
<th><%= t('Queue') %></th>
|
27
|
+
<th><%= t('Job') %></th>
|
28
|
+
<th><%= t('Arguments') %></th>
|
29
|
+
<th><%= t('Error') %></th>
|
30
|
+
</tr>
|
31
|
+
</thead>
|
32
|
+
<% @retries.each do |entry| %>
|
33
|
+
<tr>
|
34
|
+
<td class="table-checkbox">
|
35
|
+
<label>
|
36
|
+
<input type='checkbox' name='key[]' value='<%= job_params(entry.item, entry.score) %>' />
|
37
|
+
</label>
|
38
|
+
</td>
|
39
|
+
<td>
|
40
|
+
<a href="<%= root_path %>retries/<%= job_params(entry.item, entry.score) %>"><%= relative_time(entry.at) %></a>
|
41
|
+
</td>
|
42
|
+
<td><%= entry['retry_count'] %></td>
|
43
|
+
<td>
|
44
|
+
<a href="<%= root_path %>queues/<%= entry.queue %>"><%= entry.queue %></a>
|
45
|
+
</td>
|
46
|
+
<td><%= entry.display_class %></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>
|
55
57
|
<input class="btn btn-primary btn-xs pull-left" type="submit" name="retry" value="<%= t('RetryNow') %>" />
|
56
58
|
<input class="btn btn-danger btn-xs pull-left" type="submit" name="delete" value="<%= t('Delete') %>" />
|
57
59
|
<input class="btn btn-danger btn-xs pull-left" type="submit" name="kill" value="<%= t('Kill') %>" />
|
data/web/views/retry.erb
CHANGED
@@ -1,28 +1,31 @@
|
|
1
1
|
<%= erb :_job_info, :locals => {:job => @retry, :type => :retry} %>
|
2
2
|
|
3
3
|
<h3><%= t('Error') %></h3>
|
4
|
-
<
|
5
|
-
<
|
6
|
-
<
|
7
|
-
<th><%= t('ErrorClass') %></th>
|
8
|
-
<td>
|
9
|
-
<code><%= @retry['error_class'] %></code>
|
10
|
-
</td>
|
11
|
-
</tr>
|
12
|
-
<tr>
|
13
|
-
<th><%= t('ErrorMessage') %></th>
|
14
|
-
<td><%= h(@retry['error_message']) %></td>
|
15
|
-
</tr>
|
16
|
-
<% if !@retry['error_backtrace'].nil? %>
|
4
|
+
<div class="table_container">
|
5
|
+
<table class="error table table-bordered table-striped">
|
6
|
+
<tbody>
|
17
7
|
<tr>
|
18
|
-
<th><%= t('
|
8
|
+
<th><%= t('ErrorClass') %></th>
|
19
9
|
<td>
|
20
|
-
<code><%= @retry['
|
10
|
+
<code><%= @retry['error_class'] %></code>
|
21
11
|
</td>
|
22
12
|
</tr>
|
23
|
-
|
24
|
-
|
25
|
-
|
13
|
+
<tr>
|
14
|
+
<th><%= t('ErrorMessage') %></th>
|
15
|
+
<td><%= h(@retry['error_message']) %></td>
|
16
|
+
</tr>
|
17
|
+
<% if !@retry['error_backtrace'].nil? %>
|
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
|
+
|
26
29
|
<form class="form-horizontal" action="<%= root_path %>retries/<%= job_params(@retry, @retry.score) %>" method="post">
|
27
30
|
<a class="btn btn-default" href="<%= root_path %>retries"><%= t('GoBack') %></a>
|
28
31
|
<input class="btn btn-primary" type="submit" name="retry" value="<%= t('RetryNow') %>" />
|
data/web/views/scheduled.erb
CHANGED
@@ -13,36 +13,38 @@
|
|
13
13
|
<% if @scheduled.size > 0 %>
|
14
14
|
|
15
15
|
<form action="<%= root_path %>scheduled" method="post">
|
16
|
-
<
|
17
|
-
<
|
18
|
-
<
|
19
|
-
<
|
20
|
-
<
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
<
|
31
|
-
<
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
<
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
16
|
+
<div class="table_container">
|
17
|
+
<table class="table table-striped table-bordered table-white">
|
18
|
+
<thead>
|
19
|
+
<tr>
|
20
|
+
<th width="20px">
|
21
|
+
<input type="checkbox" class="check_all" />
|
22
|
+
</th>
|
23
|
+
<th><%= t('When') %></th>
|
24
|
+
<th><%= t('Queue') %></th>
|
25
|
+
<th><%= t('Job') %></th>
|
26
|
+
<th><%= t('Arguments') %></th>
|
27
|
+
</tr>
|
28
|
+
</thead>
|
29
|
+
<% @scheduled.each do |entry| %>
|
30
|
+
<tr>
|
31
|
+
<td>
|
32
|
+
<input type='checkbox' name='key[]' value='<%= job_params(entry.item, entry.score) %>' />
|
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><%= entry.display_class %></td>
|
41
|
+
<td>
|
42
|
+
<div class="args"><%= display_args(entry.display_args) %></div>
|
43
|
+
</td>
|
44
|
+
</tr>
|
45
|
+
<% end %>
|
46
|
+
</table>
|
47
|
+
</div>
|
46
48
|
<input class="btn btn-danger pull-right" type="submit" name="delete" value="<%= t('Delete') %>" />
|
47
49
|
<input class="btn btn-danger pull-right" type="submit" name="add_to_queue" value="<%= t('AddToQueue') %>" />
|
48
50
|
</form>
|