resque_ui 3.0.0 → 3.1.0
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.
- data/Gemfile +1 -0
- data/Gemfile.lock +3 -0
- data/History.txt +4 -0
- data/README.markdown +9 -5
- data/Rakefile +1 -1
- data/VERSION.yml +1 -1
- data/app/assets/stylesheets/resque_cleaner/cleaner.css +62 -0
- data/app/controllers/resque_controller.rb +167 -43
- data/app/helpers/resque_helper.rb +60 -27
- data/app/views/layouts/resque.html.erb +1 -0
- data/app/views/resque/_limiter.html.erb +12 -0
- data/app/views/resque/_paginate.html.erb +53 -0
- data/app/views/resque/_queues.html.erb +2 -2
- data/app/views/resque/_working.html.erb +1 -1
- data/app/views/resque/cleaner.html.erb +41 -0
- data/app/views/resque/cleaner_exec.html.erb +6 -0
- data/app/views/resque/cleaner_list.html.erb +172 -0
- data/app/views/resque/delayed_timestamp.html.erb +1 -1
- data/lib/resque_ui.rb +2 -1
- data/rdoc/Resque/ChainedJobWithStatus.html +0 -2
- data/rdoc/Resque/Job.html +0 -2
- data/rdoc/Resque/JobWithStatus.html +0 -2
- data/rdoc/Resque/Status.html +0 -2
- data/rdoc/Resque/Worker.html +0 -2
- data/rdoc/Resque.html +0 -7
- data/rdoc/ResqueScheduler.html +0 -2
- data/rdoc/ResqueUi/Cap.html +0 -2
- data/rdoc/ResqueUi/Engine.html +0 -2
- data/rdoc/ResqueUi.html +0 -2
- data/rdoc/created.rid +3 -4
- data/rdoc/index.html +3 -7
- data/rdoc/lib/resque_ui/cap_rb.html +1 -1
- data/rdoc/lib/resque_ui/cap_recipes_rb.html +1 -1
- data/rdoc/lib/resque_ui/overrides/resque/job_rb.html +1 -1
- data/rdoc/lib/resque_ui/overrides/resque/resque_rb.html +1 -1
- data/rdoc/lib/resque_ui/overrides/resque/worker_rb.html +1 -1
- data/rdoc/lib/resque_ui/overrides/resque_scheduler/resque_scheduler_rb.html +1 -1
- data/rdoc/lib/resque_ui/overrides/resque_status/chained_job_with_status_rb.html +1 -1
- data/rdoc/lib/resque_ui/overrides/resque_status/job_with_status_rb.html +1 -1
- data/rdoc/lib/resque_ui/overrides/resque_status/status_rb.html +1 -1
- data/rdoc/lib/resque_ui_rb.html +4 -4
- data/resque_ui.gemspec +12 -5
- metadata +20 -5
- data/app/views/resque/failed.html.erb +0 -54
- data/lib/resque_ui/overrides/resque/failure/failure.rb +0 -22
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: resque_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 3.
|
5
|
+
version: 3.1.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Kevin Tyll
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-09-
|
13
|
+
date: 2011-09-22 00:00:00 -04:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -57,6 +57,17 @@ dependencies:
|
|
57
57
|
requirement: *id004
|
58
58
|
prerelease: false
|
59
59
|
type: :runtime
|
60
|
+
- !ruby/object:Gem::Dependency
|
61
|
+
name: resque-cleaner
|
62
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
63
|
+
none: false
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: 0.2.6
|
68
|
+
requirement: *id005
|
69
|
+
prerelease: false
|
70
|
+
type: :runtime
|
60
71
|
description: A Rails UI for Resque for managing workers, failures and schedules.
|
61
72
|
email: kevintyll@gmail.com
|
62
73
|
executables: []
|
@@ -81,19 +92,24 @@ files:
|
|
81
92
|
- app/assets/javascripts/resque/ranger.js
|
82
93
|
- app/assets/stylesheets/resque/resque.css
|
83
94
|
- app/assets/stylesheets/resque/resque_reset.css
|
95
|
+
- app/assets/stylesheets/resque_cleaner/cleaner.css
|
84
96
|
- app/controllers/resque_controller.rb
|
85
97
|
- app/helpers/resque_helper.rb
|
86
98
|
- app/views/layouts/resque.html.erb
|
87
99
|
- app/views/resque/_key.html.erb
|
100
|
+
- app/views/resque/_limiter.html.erb
|
88
101
|
- app/views/resque/_next_more.html.erb
|
102
|
+
- app/views/resque/_paginate.html.erb
|
89
103
|
- app/views/resque/_queues.html.erb
|
90
104
|
- app/views/resque/_status_styles.erb
|
91
105
|
- app/views/resque/_workers.html.erb
|
92
106
|
- app/views/resque/_working.html.erb
|
107
|
+
- app/views/resque/cleaner.html.erb
|
108
|
+
- app/views/resque/cleaner_exec.html.erb
|
109
|
+
- app/views/resque/cleaner_list.html.erb
|
93
110
|
- app/views/resque/delayed.html.erb
|
94
111
|
- app/views/resque/delayed_timestamp.html.erb
|
95
112
|
- app/views/resque/error.erb
|
96
|
-
- app/views/resque/failed.html.erb
|
97
113
|
- app/views/resque/overview.html.erb
|
98
114
|
- app/views/resque/schedule.html.erb
|
99
115
|
- app/views/resque/stats.html.erb
|
@@ -103,7 +119,6 @@ files:
|
|
103
119
|
- lib/resque_ui.rb
|
104
120
|
- lib/resque_ui/cap.rb
|
105
121
|
- lib/resque_ui/cap_recipes.rb
|
106
|
-
- lib/resque_ui/overrides/resque/failure/failure.rb
|
107
122
|
- lib/resque_ui/overrides/resque/job.rb
|
108
123
|
- lib/resque_ui/overrides/resque/resque.rb
|
109
124
|
- lib/resque_ui/overrides/resque/worker.rb
|
@@ -174,7 +189,7 @@ files:
|
|
174
189
|
- test/resque_ui_test.rb
|
175
190
|
- test/test_helper.rb
|
176
191
|
has_rdoc: true
|
177
|
-
homepage:
|
192
|
+
homepage: https://github.com/kevintyll/resque_ui
|
178
193
|
licenses: []
|
179
194
|
|
180
195
|
post_install_message:
|
@@ -1,54 +0,0 @@
|
|
1
|
-
<%start = params[:start].to_i %>
|
2
|
-
<%failed = Resque::Failure.all(start, 20)%>
|
3
|
-
|
4
|
-
<h1>Failed Jobs</h1>
|
5
|
-
<%unless failed.empty?%>
|
6
|
-
<form method="POST" action="clear_failures" class='clear-failed'>
|
7
|
-
<input type='submit' name='' value='Clear Failed Jobs' />
|
8
|
-
</form>
|
9
|
-
<%end%>
|
10
|
-
|
11
|
-
<% if classes_in_failure.present? -%>
|
12
|
-
<br/>
|
13
|
-
<table style="border:1px solid #CCCCCC">
|
14
|
-
<tr>
|
15
|
-
<h2>Restart all failed jobs in class:</h2>
|
16
|
-
<% classes_in_failure.each do |c| -%>
|
17
|
-
<td style="<%="width:#{100/classes_in_failure.size}%; border:none"%>"><%= button_to c, {:controller=>'resque', :action=> 'requeue_failures_in_class', :class => c}, :method => :post %></td>
|
18
|
-
<% end -%>
|
19
|
-
</tr>
|
20
|
-
</table>
|
21
|
-
<% end -%>
|
22
|
-
|
23
|
-
<p class='sub'>Showing <%=start%> to <%= start + 20 %> of <b><%= size = Resque::Failure.count %></b> jobs</p>
|
24
|
-
|
25
|
-
<ul class='failed'>
|
26
|
-
<%for job in failed%>
|
27
|
-
<li>
|
28
|
-
<dl>
|
29
|
-
<dt>Worker</dt>
|
30
|
-
<dd><%= link_to(job['worker'].split(':')[0...3].join(':'), :action => 'workers',:id => job['worker'].gsub(/\./,'_')) %> on <b class='queue-tag'><%= job['queue'] %></b > at <b><span class="time"><%= format_time(Time.zone.parse(job['failed_at'])) %></span></b></dd>
|
31
|
-
<dt>Class</dt>
|
32
|
-
<dd><code><%= job['payload']['class'] %></code></dd>
|
33
|
-
<dt>Arguments</dt>
|
34
|
-
<dd><pre><%=h show_args(job['payload']['args']) %></pre></dd>
|
35
|
-
<dt>Error</dt>
|
36
|
-
<dd class='error'>
|
37
|
-
<a href="#" class="backtrace"><%= h(job['error']) %></a>
|
38
|
-
<pre style='display:none'><%=h job['backtrace'].join("\n") %></pre>
|
39
|
-
</dd>
|
40
|
-
<dt>
|
41
|
-
<%= button_to "Restart Job", {:controller=>'resque', :action=> 'requeue_failure', :payload => job['payload'].to_json}, :method => :post %>
|
42
|
-
</dt>
|
43
|
-
<dt></dt>
|
44
|
-
<dd>
|
45
|
-
<%= button_to "Clear Job", {:controller=>'resque', :action=> 'clear_failure', :payload => job['payload'].to_json}, :method => :post %>
|
46
|
-
</dd>
|
47
|
-
</dl>
|
48
|
-
<div class='r'>
|
49
|
-
</div>
|
50
|
-
</li>
|
51
|
-
<%end%>
|
52
|
-
</ul>
|
53
|
-
|
54
|
-
<%= render(:partial => 'next_more', :locals => {:start => start, :size => size}) %>
|
@@ -1,22 +0,0 @@
|
|
1
|
-
require 'resque/failure/redis'
|
2
|
-
|
3
|
-
module Resque
|
4
|
-
module Failure
|
5
|
-
|
6
|
-
# Requeues all failed jobs of a given class
|
7
|
-
def self.requeue_class(failed_class)
|
8
|
-
length = Resque.redis.llen(:failed)
|
9
|
-
i = 0
|
10
|
-
length.times do
|
11
|
-
f = Resque.list_range(:failed, i, 1)
|
12
|
-
if f && (failed_class.blank? || (f["payload"]["class"] == failed_class))
|
13
|
-
Resque.redis.lrem(:failed, 0, f.to_json)
|
14
|
-
args = f["payload"]["args"]
|
15
|
-
Resque.enqueue(eval(f["payload"]["class"]), *args)
|
16
|
-
else
|
17
|
-
i += 1
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|