resque_ui 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +6 -0
- data/Gemfile.lock +102 -0
- data/History.txt +5 -0
- data/MIT-LICENSE +21 -0
- data/README.markdown +279 -0
- data/Rakefile +49 -0
- data/VERSION.yml +5 -0
- data/app/assets/images/idle.png +0 -0
- data/app/assets/images/poll.png +0 -0
- data/app/assets/images/working.png +0 -0
- data/app/assets/javascripts/resque/jquery-1.3.2.min.js +19 -0
- data/app/assets/javascripts/resque/jquery.relatize_date.js +95 -0
- data/app/assets/javascripts/resque/ranger.js +24 -0
- data/app/assets/stylesheets/resque/resque.css +93 -0
- data/app/assets/stylesheets/resque/resque_reset.css +48 -0
- data/app/controllers/resque_controller.rb +236 -0
- data/app/helpers/resque_helper.rb +107 -0
- data/app/views/layouts/resque.html.erb +39 -0
- data/app/views/resque/_key.html.erb +17 -0
- data/app/views/resque/_next_more.html.erb +10 -0
- data/app/views/resque/_queues.html.erb +52 -0
- data/app/views/resque/_status_styles.erb +98 -0
- data/app/views/resque/_workers.html.erb +110 -0
- data/app/views/resque/_working.html.erb +69 -0
- data/app/views/resque/delayed.html.erb +35 -0
- data/app/views/resque/delayed_timestamp.html.erb +26 -0
- data/app/views/resque/error.erb +1 -0
- data/app/views/resque/failed.html.erb +54 -0
- data/app/views/resque/overview.html.erb +4 -0
- data/app/views/resque/schedule.html.erb +96 -0
- data/app/views/resque/stats.html.erb +62 -0
- data/app/views/resque/status.html.erb +57 -0
- data/app/views/resque/statuses.html.erb +72 -0
- data/app/views/resque/workers.html.erb +1 -0
- data/lib/resque_ui/cap.rb +6 -0
- data/lib/resque_ui/cap_recipes.rb +106 -0
- data/lib/resque_ui/overrides/resque/failure/failure.rb +22 -0
- data/lib/resque_ui/overrides/resque/job.rb +12 -0
- data/lib/resque_ui/overrides/resque/resque.rb +8 -0
- data/lib/resque_ui/overrides/resque/worker.rb +230 -0
- data/lib/resque_ui/overrides/resque_scheduler/resque_scheduler.rb +58 -0
- data/lib/resque_ui/overrides/resque_status/chained_job_with_status.rb +24 -0
- data/lib/resque_ui/overrides/resque_status/job_with_status.rb +59 -0
- data/lib/resque_ui/overrides/resque_status/status.rb +53 -0
- data/lib/resque_ui.rb +26 -0
- data/lib/tasks/failure.rake +8 -0
- data/lib/tasks/scheduler.rake +11 -0
- data/lib/tasks/worker.rake +80 -0
- data/rdoc/Resque/ChainedJobWithStatus.html +284 -0
- data/rdoc/Resque/Failure/Base.html +229 -0
- data/rdoc/Resque/Failure.html +202 -0
- data/rdoc/Resque/Job.html +202 -0
- data/rdoc/Resque/JobWithStatus.html +410 -0
- data/rdoc/Resque/Status.html +368 -0
- data/rdoc/Resque/Worker.html +1104 -0
- data/rdoc/Resque.html +232 -0
- data/rdoc/ResqueScheduler.html +434 -0
- data/rdoc/ResqueUi/Cap.html +150 -0
- data/rdoc/ResqueUi/Engine.html +150 -0
- data/rdoc/ResqueUi.html +157 -0
- data/rdoc/created.rid +13 -0
- data/rdoc/images/brick.png +0 -0
- data/rdoc/images/brick_link.png +0 -0
- data/rdoc/images/bug.png +0 -0
- data/rdoc/images/bullet_black.png +0 -0
- data/rdoc/images/bullet_toggle_minus.png +0 -0
- data/rdoc/images/bullet_toggle_plus.png +0 -0
- data/rdoc/images/date.png +0 -0
- data/rdoc/images/find.png +0 -0
- data/rdoc/images/loadingAnimation.gif +0 -0
- data/rdoc/images/macFFBgHack.png +0 -0
- data/rdoc/images/package.png +0 -0
- data/rdoc/images/page_green.png +0 -0
- data/rdoc/images/page_white_text.png +0 -0
- data/rdoc/images/page_white_width.png +0 -0
- data/rdoc/images/plugin.png +0 -0
- data/rdoc/images/ruby.png +0 -0
- data/rdoc/images/tag_green.png +0 -0
- data/rdoc/images/wrench.png +0 -0
- data/rdoc/images/wrench_orange.png +0 -0
- data/rdoc/images/zoom.png +0 -0
- data/rdoc/index.html +163 -0
- data/rdoc/js/darkfish.js +116 -0
- data/rdoc/js/jquery.js +32 -0
- data/rdoc/js/quicksearch.js +114 -0
- data/rdoc/js/thickbox-compressed.js +10 -0
- data/rdoc/lib/resque_overrides_rb.html +54 -0
- data/rdoc/lib/resque_scheduler_overrides_rb.html +52 -0
- data/rdoc/lib/resque_status_overrides_rb.html +52 -0
- data/rdoc/lib/resque_ui/cap_rb.html +52 -0
- data/rdoc/lib/resque_ui/cap_recipes_rb.html +58 -0
- data/rdoc/lib/resque_ui/engine_rb.html +52 -0
- data/rdoc/lib/resque_ui/overrides/resque/failure/failure_rb.html +54 -0
- data/rdoc/lib/resque_ui/overrides/resque/job_rb.html +52 -0
- data/rdoc/lib/resque_ui/overrides/resque/resque_rb.html +52 -0
- data/rdoc/lib/resque_ui/overrides/resque/worker_rb.html +54 -0
- data/rdoc/lib/resque_ui/overrides/resque_scheduler/resque_scheduler_rb.html +52 -0
- data/rdoc/lib/resque_ui/overrides/resque_status/chained_job_with_status_rb.html +52 -0
- data/rdoc/lib/resque_ui/overrides/resque_status/job_with_status_rb.html +52 -0
- data/rdoc/lib/resque_ui/overrides/resque_status/status_rb.html +52 -0
- data/rdoc/lib/resque_ui/resque_ui_rb.html +52 -0
- data/rdoc/lib/resque_ui/tasks_rb.html +64 -0
- data/rdoc/lib/resque_ui_rb.html +76 -0
- data/rdoc/rdoc.css +763 -0
- data/resque_ui.gemspec +153 -0
- data/test/resque_ui_test.rb +8 -0
- data/test/test_helper.rb +3 -0
- metadata +205 -0
@@ -0,0 +1,202 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
7
|
+
|
8
|
+
<title>Module: Resque::Failure</title>
|
9
|
+
|
10
|
+
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
|
11
|
+
|
12
|
+
<script src="../js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
13
|
+
<script src="../js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
|
14
|
+
<script src="../js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
|
15
|
+
<script src="../js/darkfish.js" type="text/javascript" charset="utf-8"></script>
|
16
|
+
|
17
|
+
</head>
|
18
|
+
<body id="top" class="module">
|
19
|
+
|
20
|
+
<div id="metadata">
|
21
|
+
<div id="home-metadata">
|
22
|
+
<div id="home-section" class="section">
|
23
|
+
<h3 class="section-header">
|
24
|
+
<a href="../index.html">Home</a>
|
25
|
+
<a href="../index.html#classes">Classes</a>
|
26
|
+
<a href="../index.html#methods">Methods</a>
|
27
|
+
</h3>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<div id="file-metadata">
|
32
|
+
<div id="file-list-section" class="section">
|
33
|
+
<h3 class="section-header">In Files</h3>
|
34
|
+
<div class="section-body">
|
35
|
+
<ul>
|
36
|
+
|
37
|
+
<li><a href="../lib/resque_ui/overrides/resque/failure/failure_rb.html?TB_iframe=true&height=550&width=785"
|
38
|
+
class="thickbox" title="lib/resque_ui/overrides/resque/failure/failure.rb">lib/resque_ui/overrides/resque/failure/failure.rb</a></li>
|
39
|
+
|
40
|
+
</ul>
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
|
45
|
+
</div>
|
46
|
+
|
47
|
+
<div id="class-metadata">
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
<!-- Method Quickref -->
|
56
|
+
<div id="method-list-section" class="section">
|
57
|
+
<h3 class="section-header">Methods</h3>
|
58
|
+
<ul class="link-list">
|
59
|
+
|
60
|
+
<li><a href="#method-c-requeue_class">::requeue_class</a></li>
|
61
|
+
|
62
|
+
</ul>
|
63
|
+
</div>
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
</div>
|
68
|
+
|
69
|
+
<div id="project-metadata">
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
<div id="classindex-section" class="section project-section">
|
74
|
+
<h3 class="section-header">Class/Module Index
|
75
|
+
<span class="search-toggle"><img src="../images/find.png"
|
76
|
+
height="16" width="16" alt="[+]"
|
77
|
+
title="show/hide quicksearch" /></span></h3>
|
78
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
79
|
+
<fieldset>
|
80
|
+
<legend>Quicksearch</legend>
|
81
|
+
<input type="text" name="quicksearch" value=""
|
82
|
+
class="quicksearch-field" />
|
83
|
+
</fieldset>
|
84
|
+
</form>
|
85
|
+
|
86
|
+
<ul class="link-list">
|
87
|
+
|
88
|
+
<li><a href="../Resque.html">Resque</a></li>
|
89
|
+
|
90
|
+
<li><a href="../Resque/ChainedJobWithStatus.html">Resque::ChainedJobWithStatus</a></li>
|
91
|
+
|
92
|
+
<li><a href="../Resque/Failure.html">Resque::Failure</a></li>
|
93
|
+
|
94
|
+
<li><a href="../Resque/Job.html">Resque::Job</a></li>
|
95
|
+
|
96
|
+
<li><a href="../Resque/JobWithStatus.html">Resque::JobWithStatus</a></li>
|
97
|
+
|
98
|
+
<li><a href="../Resque/Status.html">Resque::Status</a></li>
|
99
|
+
|
100
|
+
<li><a href="../Resque/Worker.html">Resque::Worker</a></li>
|
101
|
+
|
102
|
+
<li><a href="../ResqueUi.html">ResqueUi</a></li>
|
103
|
+
|
104
|
+
<li><a href="../ResqueUi/Cap.html">ResqueUi::Cap</a></li>
|
105
|
+
|
106
|
+
<li><a href="../ResqueUi/Engine.html">ResqueUi::Engine</a></li>
|
107
|
+
|
108
|
+
<li><a href="../ResqueScheduler.html">ResqueScheduler</a></li>
|
109
|
+
|
110
|
+
</ul>
|
111
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
112
|
+
</div>
|
113
|
+
|
114
|
+
|
115
|
+
</div>
|
116
|
+
</div>
|
117
|
+
|
118
|
+
<div id="documentation">
|
119
|
+
<h1 class="module">Resque::Failure</h1>
|
120
|
+
|
121
|
+
<div id="description" class="description">
|
122
|
+
|
123
|
+
</div><!-- description -->
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
<div id="5Buntitled-5D" class="documentation-section">
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
<!-- Methods -->
|
138
|
+
|
139
|
+
<div id="public-class-method-details" class="method-section section">
|
140
|
+
<h3 class="section-header">Public Class Methods</h3>
|
141
|
+
|
142
|
+
|
143
|
+
<div id="requeue_class-method" class="method-detail ">
|
144
|
+
<a name="method-c-requeue_class"></a>
|
145
|
+
|
146
|
+
|
147
|
+
<div class="method-heading">
|
148
|
+
<span class="method-name">requeue_class</span><span
|
149
|
+
class="method-args">(failed_class)</span>
|
150
|
+
<span class="method-click-advice">click to toggle source</span>
|
151
|
+
</div>
|
152
|
+
|
153
|
+
|
154
|
+
<div class="method-description">
|
155
|
+
|
156
|
+
<p>Requeues all failed jobs of a given class</p>
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
<div class="method-source-code" id="requeue_class-source">
|
161
|
+
<pre>
|
162
|
+
<span class="ruby-comment"># File lib/resque_ui/overrides/resque/failure/failure.rb, line 7</span>
|
163
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">requeue_class</span>(<span class="ruby-identifier">failed_class</span>)
|
164
|
+
<span class="ruby-identifier">length</span> = <span class="ruby-constant">Resque</span>.<span class="ruby-identifier">redis</span>.<span class="ruby-identifier">llen</span>(<span class="ruby-value">:failed</span>)
|
165
|
+
<span class="ruby-identifier">i</span> = <span class="ruby-value">0</span>
|
166
|
+
<span class="ruby-identifier">length</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword">do</span>
|
167
|
+
<span class="ruby-identifier">f</span> = <span class="ruby-constant">Resque</span>.<span class="ruby-identifier">list_range</span>(<span class="ruby-value">:failed</span>, <span class="ruby-identifier">i</span>, <span class="ruby-value">1</span>)
|
168
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">f</span> <span class="ruby-operator">&&</span> (<span class="ruby-identifier">failed_class</span>.<span class="ruby-identifier">blank?</span> <span class="ruby-operator">||</span> (<span class="ruby-identifier">f</span>[<span class="ruby-string">"payload"</span>][<span class="ruby-string">"class"</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">failed_class</span>))
|
169
|
+
<span class="ruby-constant">Resque</span>.<span class="ruby-identifier">redis</span>.<span class="ruby-identifier">lrem</span>(<span class="ruby-value">:failed</span>, <span class="ruby-value">0</span>, <span class="ruby-identifier">f</span>.<span class="ruby-identifier">to_json</span>)
|
170
|
+
<span class="ruby-identifier">args</span> = <span class="ruby-identifier">f</span>[<span class="ruby-string">"payload"</span>][<span class="ruby-string">"args"</span>]
|
171
|
+
<span class="ruby-constant">Resque</span>.<span class="ruby-identifier">enqueue</span>(<span class="ruby-identifier">eval</span>(<span class="ruby-identifier">f</span>[<span class="ruby-string">"payload"</span>][<span class="ruby-string">"class"</span>]), *<span class="ruby-identifier">args</span>)
|
172
|
+
<span class="ruby-keyword">else</span>
|
173
|
+
<span class="ruby-identifier">i</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
174
|
+
<span class="ruby-keyword">end</span>
|
175
|
+
<span class="ruby-keyword">end</span>
|
176
|
+
<span class="ruby-keyword">end</span></pre>
|
177
|
+
</div><!-- requeue_class-source -->
|
178
|
+
|
179
|
+
</div>
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
</div><!-- requeue_class-method -->
|
185
|
+
|
186
|
+
|
187
|
+
</div><!-- public-class-method-details -->
|
188
|
+
|
189
|
+
</div><!-- 5Buntitled-5D -->
|
190
|
+
|
191
|
+
|
192
|
+
</div><!-- documentation -->
|
193
|
+
|
194
|
+
<div id="validator-badges">
|
195
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
196
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
197
|
+
Rdoc Generator</a> 2</small>.</p>
|
198
|
+
</div>
|
199
|
+
|
200
|
+
</body>
|
201
|
+
</html>
|
202
|
+
|
@@ -0,0 +1,202 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
7
|
+
|
8
|
+
<title>Class: Resque::Job</title>
|
9
|
+
|
10
|
+
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
|
11
|
+
|
12
|
+
<script src="../js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
13
|
+
<script src="../js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
|
14
|
+
<script src="../js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
|
15
|
+
<script src="../js/darkfish.js" type="text/javascript" charset="utf-8"></script>
|
16
|
+
|
17
|
+
</head>
|
18
|
+
<body id="top" class="class">
|
19
|
+
|
20
|
+
<div id="metadata">
|
21
|
+
<div id="home-metadata">
|
22
|
+
<div id="home-section" class="section">
|
23
|
+
<h3 class="section-header">
|
24
|
+
<a href="../index.html">Home</a>
|
25
|
+
<a href="../index.html#classes">Classes</a>
|
26
|
+
<a href="../index.html#methods">Methods</a>
|
27
|
+
</h3>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<div id="file-metadata">
|
32
|
+
<div id="file-list-section" class="section">
|
33
|
+
<h3 class="section-header">In Files</h3>
|
34
|
+
<div class="section-body">
|
35
|
+
<ul>
|
36
|
+
|
37
|
+
<li><a href="../lib/resque_ui/overrides/resque/job_rb.html?TB_iframe=true&height=550&width=785"
|
38
|
+
class="thickbox" title="lib/resque_ui/overrides/resque/job.rb">lib/resque_ui/overrides/resque/job.rb</a></li>
|
39
|
+
|
40
|
+
</ul>
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
|
45
|
+
</div>
|
46
|
+
|
47
|
+
<div id="class-metadata">
|
48
|
+
|
49
|
+
<!-- Parent Class -->
|
50
|
+
<div id="parent-class-section" class="section">
|
51
|
+
<h3 class="section-header">Parent</h3>
|
52
|
+
|
53
|
+
<p class="link">Object</p>
|
54
|
+
|
55
|
+
</div>
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
<!-- Method Quickref -->
|
64
|
+
<div id="method-list-section" class="section">
|
65
|
+
<h3 class="section-header">Methods</h3>
|
66
|
+
<ul class="link-list">
|
67
|
+
|
68
|
+
<li><a href="#method-i-perform">#perform</a></li>
|
69
|
+
|
70
|
+
</ul>
|
71
|
+
</div>
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
</div>
|
76
|
+
|
77
|
+
<div id="project-metadata">
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<div id="classindex-section" class="section project-section">
|
82
|
+
<h3 class="section-header">Class/Module Index
|
83
|
+
<span class="search-toggle"><img src="../images/find.png"
|
84
|
+
height="16" width="16" alt="[+]"
|
85
|
+
title="show/hide quicksearch" /></span></h3>
|
86
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
87
|
+
<fieldset>
|
88
|
+
<legend>Quicksearch</legend>
|
89
|
+
<input type="text" name="quicksearch" value=""
|
90
|
+
class="quicksearch-field" />
|
91
|
+
</fieldset>
|
92
|
+
</form>
|
93
|
+
|
94
|
+
<ul class="link-list">
|
95
|
+
|
96
|
+
<li><a href="../Resque.html">Resque</a></li>
|
97
|
+
|
98
|
+
<li><a href="../Resque/ChainedJobWithStatus.html">Resque::ChainedJobWithStatus</a></li>
|
99
|
+
|
100
|
+
<li><a href="../Resque/Failure.html">Resque::Failure</a></li>
|
101
|
+
|
102
|
+
<li><a href="../Resque/Job.html">Resque::Job</a></li>
|
103
|
+
|
104
|
+
<li><a href="../Resque/JobWithStatus.html">Resque::JobWithStatus</a></li>
|
105
|
+
|
106
|
+
<li><a href="../Resque/Status.html">Resque::Status</a></li>
|
107
|
+
|
108
|
+
<li><a href="../Resque/Worker.html">Resque::Worker</a></li>
|
109
|
+
|
110
|
+
<li><a href="../ResqueUi.html">ResqueUi</a></li>
|
111
|
+
|
112
|
+
<li><a href="../ResqueUi/Cap.html">ResqueUi::Cap</a></li>
|
113
|
+
|
114
|
+
<li><a href="../ResqueUi/Engine.html">ResqueUi::Engine</a></li>
|
115
|
+
|
116
|
+
<li><a href="../ResqueScheduler.html">ResqueScheduler</a></li>
|
117
|
+
|
118
|
+
</ul>
|
119
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
120
|
+
</div>
|
121
|
+
|
122
|
+
|
123
|
+
</div>
|
124
|
+
</div>
|
125
|
+
|
126
|
+
<div id="documentation">
|
127
|
+
<h1 class="class">Resque::Job</h1>
|
128
|
+
|
129
|
+
<div id="description" class="description">
|
130
|
+
|
131
|
+
</div><!-- description -->
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
<div id="5Buntitled-5D" class="documentation-section">
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
<!-- Methods -->
|
146
|
+
|
147
|
+
<div id="public-instance-method-details" class="method-section section">
|
148
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
149
|
+
|
150
|
+
|
151
|
+
<div id="perform-method" class="method-detail ">
|
152
|
+
<a name="method-i-perform"></a>
|
153
|
+
|
154
|
+
|
155
|
+
<div class="method-heading">
|
156
|
+
<span class="method-name">perform</span><span
|
157
|
+
class="method-args">()</span>
|
158
|
+
<span class="method-click-advice">click to toggle source</span>
|
159
|
+
</div>
|
160
|
+
|
161
|
+
|
162
|
+
<div class="method-description">
|
163
|
+
|
164
|
+
<p>Attempts to perform the work represented by this job instance. Calls <a
|
165
|
+
href="Job.html#method-i-perform">perform</a> on the class given in the
|
166
|
+
payload with the arguments given in the payload. The worker is passed in so
|
167
|
+
the status can be set for the UI to display.</p>
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
<div class="method-source-code" id="perform-source">
|
172
|
+
<pre>
|
173
|
+
<span class="ruby-comment"># File lib/resque_ui/overrides/resque/job.rb, line 7</span>
|
174
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">perform</span>
|
175
|
+
<span class="ruby-identifier">args</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">payload_class</span>.<span class="ruby-identifier">perform</span>(*<span class="ruby-identifier">args</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">status</span><span class="ruby-operator">|</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">worker</span>.<span class="ruby-identifier">status</span> = <span class="ruby-identifier">status</span> } <span class="ruby-operator">:</span> <span class="ruby-identifier">payload_class</span>.<span class="ruby-identifier">perform</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">status</span><span class="ruby-operator">|</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">worker</span>.<span class="ruby-identifier">status</span> = <span class="ruby-identifier">status</span> }
|
176
|
+
<span class="ruby-keyword">end</span></pre>
|
177
|
+
</div><!-- perform-source -->
|
178
|
+
|
179
|
+
</div>
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
</div><!-- perform-method -->
|
185
|
+
|
186
|
+
|
187
|
+
</div><!-- public-instance-method-details -->
|
188
|
+
|
189
|
+
</div><!-- 5Buntitled-5D -->
|
190
|
+
|
191
|
+
|
192
|
+
</div><!-- documentation -->
|
193
|
+
|
194
|
+
<div id="validator-badges">
|
195
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
196
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
197
|
+
Rdoc Generator</a> 2</small>.</p>
|
198
|
+
</div>
|
199
|
+
|
200
|
+
</body>
|
201
|
+
</html>
|
202
|
+
|