job_boss 0.2
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/README.markdown +43 -0
- data/Rakefile +15 -0
- data/bin/job_boss +27 -0
- data/doc/ActiveRecord/Base.html +343 -0
- data/doc/ActiveRecord.html +185 -0
- data/doc/CreateJobs.html +256 -0
- data/doc/JobBoss/Boss.html +413 -0
- data/doc/JobBoss/Config.html +342 -0
- data/doc/JobBoss/Job.html +754 -0
- data/doc/JobBoss/Queuer.html +231 -0
- data/doc/JobBoss.html +480 -0
- data/doc/Mongrel/HttpServer.html +275 -0
- data/doc/Mongrel.html +185 -0
- data/doc/Passenger/Railz/RequestHandler.html +271 -0
- data/doc/Passenger/Railz.html +185 -0
- data/doc/Passenger.html +185 -0
- data/doc/PhusionPassenger/Rack/RequestHandler.html +271 -0
- data/doc/PhusionPassenger/Rack.html +185 -0
- data/doc/PhusionPassenger/Railz/RequestHandler.html +271 -0
- data/doc/PhusionPassenger/Railz.html +185 -0
- data/doc/PhusionPassenger.html +187 -0
- data/doc/Rakefile.html +115 -0
- data/doc/Spawn/SpawnId.html +276 -0
- data/doc/Spawn.html +742 -0
- data/doc/bin/job_boss.html +58 -0
- data/doc/created.rid +9 -0
- data/doc/index.html +126 -0
- data/doc/lib/job_boss/boss_rb.html +64 -0
- data/doc/lib/job_boss/capistrano_rb.html +60 -0
- data/doc/lib/job_boss/configuror_rb.html +54 -0
- data/doc/lib/job_boss/job_rb.html +56 -0
- data/doc/lib/job_boss/queuer_rb.html +56 -0
- data/doc/lib/migrate_rb.html +52 -0
- data/doc/rdoc.css +706 -0
- data/doc/vendor/spawn/CHANGELOG.html +275 -0
- data/doc/vendor/spawn/LICENSE.html +151 -0
- data/doc/vendor/spawn/init_rb.html +54 -0
- data/doc/vendor/spawn/lib/patches_rb.html +56 -0
- data/doc/vendor/spawn/lib/spawn_rb.html +52 -0
- data/job_boss.gemspec +26 -0
- data/lib/job_boss/boss.rb +153 -0
- data/lib/job_boss/capistrano.rb +8 -0
- data/lib/job_boss/configuror.rb +40 -0
- data/lib/job_boss/job.rb +155 -0
- data/lib/job_boss/queuer.rb +37 -0
- data/lib/migrate.rb +27 -0
- metadata +151 -0
@@ -0,0 +1,342 @@
|
|
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: JobBoss::Config</title>
|
9
|
+
|
10
|
+
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
|
11
|
+
|
12
|
+
<script src="../js/jquery.js" type="text/javascript"
|
13
|
+
charset="utf-8"></script>
|
14
|
+
<script src="../js/thickbox-compressed.js" type="text/javascript"
|
15
|
+
charset="utf-8"></script>
|
16
|
+
<script src="../js/quicksearch.js" type="text/javascript"
|
17
|
+
charset="utf-8"></script>
|
18
|
+
<script src="../js/darkfish.js" type="text/javascript"
|
19
|
+
charset="utf-8"></script>
|
20
|
+
|
21
|
+
</head>
|
22
|
+
<body class="class">
|
23
|
+
|
24
|
+
<div id="metadata">
|
25
|
+
<div id="home-metadata">
|
26
|
+
<div id="home-section" class="section">
|
27
|
+
<h3 class="section-header">
|
28
|
+
<a href="../index.html">Home</a>
|
29
|
+
<a href="../index.html#classes">Classes</a>
|
30
|
+
<a href="../index.html#methods">Methods</a>
|
31
|
+
</h3>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="file-metadata">
|
36
|
+
<div id="file-list-section" class="section">
|
37
|
+
<h3 class="section-header">In Files</h3>
|
38
|
+
<div class="section-body">
|
39
|
+
<ul>
|
40
|
+
|
41
|
+
<li><a href="../lib/job_boss/configuror_rb.html?TB_iframe=true&height=550&width=785"
|
42
|
+
class="thickbox" title="lib/job_boss/configuror.rb">lib/job_boss/configuror.rb</a></li>
|
43
|
+
|
44
|
+
</ul>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
|
48
|
+
|
49
|
+
</div>
|
50
|
+
|
51
|
+
<div id="class-metadata">
|
52
|
+
|
53
|
+
<!-- Parent Class -->
|
54
|
+
|
55
|
+
<div id="parent-class-section" class="section">
|
56
|
+
<h3 class="section-header">Parent</h3>
|
57
|
+
|
58
|
+
<p class="link">Object</p>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
|
62
|
+
|
63
|
+
<!-- Namespace Contents -->
|
64
|
+
|
65
|
+
|
66
|
+
<!-- Method Quickref -->
|
67
|
+
|
68
|
+
<div id="method-list-section" class="section">
|
69
|
+
<h3 class="section-header">Methods</h3>
|
70
|
+
<ul class="link-list">
|
71
|
+
|
72
|
+
<li><a href="#method-i-parse_args">#parse_args</a></li>
|
73
|
+
|
74
|
+
</ul>
|
75
|
+
</div>
|
76
|
+
|
77
|
+
|
78
|
+
<!-- Included Modules -->
|
79
|
+
|
80
|
+
</div>
|
81
|
+
|
82
|
+
<div id="project-metadata">
|
83
|
+
|
84
|
+
|
85
|
+
<div id="fileindex-section" class="section project-section">
|
86
|
+
<h3 class="section-header">Files</h3>
|
87
|
+
<ul>
|
88
|
+
|
89
|
+
<li class="file"><a href="../Rakefile.html">Rakefile</a></li>
|
90
|
+
|
91
|
+
</ul>
|
92
|
+
</div>
|
93
|
+
|
94
|
+
|
95
|
+
<div id="classindex-section" class="section project-section">
|
96
|
+
<h3 class="section-header">Class Index
|
97
|
+
<span class="search-toggle"><img src="../images/find.png"
|
98
|
+
height="16" width="16" alt="[+]"
|
99
|
+
title="show/hide quicksearch" /></span></h3>
|
100
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
101
|
+
<fieldset>
|
102
|
+
<legend>Quicksearch</legend>
|
103
|
+
<input type="text" name="quicksearch" value=""
|
104
|
+
class="quicksearch-field" />
|
105
|
+
</fieldset>
|
106
|
+
</form>
|
107
|
+
|
108
|
+
<ul class="link-list">
|
109
|
+
|
110
|
+
<li><a href="../JobBoss.html">JobBoss</a></li>
|
111
|
+
|
112
|
+
<li><a href="../JobBoss/Boss.html">JobBoss::Boss</a></li>
|
113
|
+
|
114
|
+
<li><a href="../JobBoss/Config.html">JobBoss::Config</a></li>
|
115
|
+
|
116
|
+
<li><a href="../JobBoss/Job.html">JobBoss::Job</a></li>
|
117
|
+
|
118
|
+
<li><a href="../JobBoss/Queuer.html">JobBoss::Queuer</a></li>
|
119
|
+
|
120
|
+
<li><a href="../CreateJobs.html">CreateJobs</a></li>
|
121
|
+
|
122
|
+
</ul>
|
123
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
124
|
+
</div>
|
125
|
+
|
126
|
+
|
127
|
+
</div>
|
128
|
+
</div>
|
129
|
+
|
130
|
+
<div id="documentation">
|
131
|
+
<h1 class="class">JobBoss::Config</h1>
|
132
|
+
|
133
|
+
<div id="description">
|
134
|
+
|
135
|
+
</div>
|
136
|
+
|
137
|
+
<!-- Constants -->
|
138
|
+
|
139
|
+
|
140
|
+
<!-- Attributes -->
|
141
|
+
|
142
|
+
<div id="attribute-method-details" class="method-section section">
|
143
|
+
<h3 class="section-header">Attributes</h3>
|
144
|
+
|
145
|
+
|
146
|
+
<div id="working-dir-attribute-method" class="method-detail">
|
147
|
+
<a name="working_dir"></a>
|
148
|
+
|
149
|
+
<a name="working_dir="></a>
|
150
|
+
|
151
|
+
<div class="method-heading attribute-method-heading">
|
152
|
+
<span class="method-name">working_dir</span><span
|
153
|
+
class="attribute-access-type">[RW]</span>
|
154
|
+
</div>
|
155
|
+
|
156
|
+
<div class="method-description">
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
</div>
|
161
|
+
</div>
|
162
|
+
|
163
|
+
<div id="database-yaml-path-attribute-method" class="method-detail">
|
164
|
+
<a name="database_yaml_path"></a>
|
165
|
+
|
166
|
+
<a name="database_yaml_path="></a>
|
167
|
+
|
168
|
+
<div class="method-heading attribute-method-heading">
|
169
|
+
<span class="method-name">database_yaml_path</span><span
|
170
|
+
class="attribute-access-type">[RW]</span>
|
171
|
+
</div>
|
172
|
+
|
173
|
+
<div class="method-description">
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
</div>
|
178
|
+
</div>
|
179
|
+
|
180
|
+
<div id="jobs-path-attribute-method" class="method-detail">
|
181
|
+
<a name="jobs_path"></a>
|
182
|
+
|
183
|
+
<a name="jobs_path="></a>
|
184
|
+
|
185
|
+
<div class="method-heading attribute-method-heading">
|
186
|
+
<span class="method-name">jobs_path</span><span
|
187
|
+
class="attribute-access-type">[RW]</span>
|
188
|
+
</div>
|
189
|
+
|
190
|
+
<div class="method-description">
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
</div>
|
195
|
+
</div>
|
196
|
+
|
197
|
+
<div id="sleep-interval-attribute-method" class="method-detail">
|
198
|
+
<a name="sleep_interval"></a>
|
199
|
+
|
200
|
+
<a name="sleep_interval="></a>
|
201
|
+
|
202
|
+
<div class="method-heading attribute-method-heading">
|
203
|
+
<span class="method-name">sleep_interval</span><span
|
204
|
+
class="attribute-access-type">[RW]</span>
|
205
|
+
</div>
|
206
|
+
|
207
|
+
<div class="method-description">
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
</div>
|
212
|
+
</div>
|
213
|
+
|
214
|
+
<div id="employee-limit-attribute-method" class="method-detail">
|
215
|
+
<a name="employee_limit"></a>
|
216
|
+
|
217
|
+
<a name="employee_limit="></a>
|
218
|
+
|
219
|
+
<div class="method-heading attribute-method-heading">
|
220
|
+
<span class="method-name">employee_limit</span><span
|
221
|
+
class="attribute-access-type">[RW]</span>
|
222
|
+
</div>
|
223
|
+
|
224
|
+
<div class="method-description">
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
</div>
|
229
|
+
</div>
|
230
|
+
|
231
|
+
<div id="environment-attribute-method" class="method-detail">
|
232
|
+
<a name="environment"></a>
|
233
|
+
|
234
|
+
<a name="environment="></a>
|
235
|
+
|
236
|
+
<div class="method-heading attribute-method-heading">
|
237
|
+
<span class="method-name">environment</span><span
|
238
|
+
class="attribute-access-type">[RW]</span>
|
239
|
+
</div>
|
240
|
+
|
241
|
+
<div class="method-description">
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
</div>
|
246
|
+
</div>
|
247
|
+
|
248
|
+
</div>
|
249
|
+
|
250
|
+
|
251
|
+
<!-- Methods -->
|
252
|
+
|
253
|
+
<div id="public-instance-method-details" class="method-section section">
|
254
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
255
|
+
|
256
|
+
|
257
|
+
<div id="parse-args-method" class="method-detail ">
|
258
|
+
<a name="method-i-parse_args"></a>
|
259
|
+
|
260
|
+
<div class="method-heading">
|
261
|
+
|
262
|
+
<span class="method-name">parse_args</span><span
|
263
|
+
class="method-args">(argv, options = {})</span>
|
264
|
+
<span class="method-click-advice">click to toggle source</span>
|
265
|
+
|
266
|
+
</div>
|
267
|
+
|
268
|
+
<div class="method-description">
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
<div class="method-source-code"
|
275
|
+
id="parse-args-source">
|
276
|
+
<pre>
|
277
|
+
<span class="ruby-comment cmt"># File lib/job_boss/configuror.rb, line 5</span>
|
278
|
+
5: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse_args</span>(<span class="ruby-identifier">argv</span>, <span class="ruby-identifier">options</span> = {})
|
279
|
+
6: <span class="ruby-ivar">@working_dir</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value">:working_dir</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">pwd</span>
|
280
|
+
7: <span class="ruby-ivar">@database_yaml_path</span> = <span class="ruby-value str">'config/database.yml'</span>
|
281
|
+
8: <span class="ruby-ivar">@jobs_path</span> = <span class="ruby-value str">'app/jobs'</span>
|
282
|
+
9: <span class="ruby-ivar">@sleep_interval</span> = <span class="ruby-value">0.5</span>
|
283
|
+
10: <span class="ruby-ivar">@employee_limit</span> = <span class="ruby-value">4</span>
|
284
|
+
11: <span class="ruby-ivar">@environment</span> = <span class="ruby-value str">'development'</span>
|
285
|
+
12:
|
286
|
+
13: <span class="ruby-identifier">require</span> <span class="ruby-value str">'optparse'</span>
|
287
|
+
14:
|
288
|
+
15: <span class="ruby-constant">OptionParser</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">opts</span><span class="ruby-operator">|</span>
|
289
|
+
16: <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">banner</span> = <span class="ruby-value str">"Usage: job_boss [start|stop|restart|status|watch] [-- <options>]"</span>
|
290
|
+
17:
|
291
|
+
18: <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">on</span>(<span class="ruby-value str">"-d"</span>, <span class="ruby-value str">"--database-yaml PATH"</span>, <span class="ruby-value str">"Path for database YAML (defaults to ./config/database.yml)"</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">path</span><span class="ruby-operator">|</span>
|
292
|
+
19: <span class="ruby-ivar">@database_yaml_path</span> = <span class="ruby-identifier">path</span>
|
293
|
+
20: <span class="ruby-keyword kw">end</span>
|
294
|
+
21:
|
295
|
+
22: <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">on</span>(<span class="ruby-value str">"-j"</span>, <span class="ruby-value str">"--jobs-path PATH"</span>, <span class="ruby-value str">"Path to folder with job classes (defaults to ./app/jobs)"</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">path</span><span class="ruby-operator">|</span>
|
296
|
+
23: <span class="ruby-ivar">@database_yaml_path</span> = <span class="ruby-identifier">path</span>
|
297
|
+
24: <span class="ruby-keyword kw">end</span>
|
298
|
+
25:
|
299
|
+
26: <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">on</span>(<span class="ruby-value str">"-e"</span>, <span class="ruby-value str">"--environment ENV"</span>, <span class="ruby-value str">"Rails environment to use in database YAML file (defaults to 'development')"</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">env</span><span class="ruby-operator">|</span>
|
300
|
+
27: <span class="ruby-ivar">@environment</span> = <span class="ruby-identifier">env</span>
|
301
|
+
28: <span class="ruby-keyword kw">end</span>
|
302
|
+
29:
|
303
|
+
30: <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">on</span>(<span class="ruby-value str">"-s"</span>, <span class="ruby-value str">"--sleep-interval INTERVAL"</span>, <span class="ruby-constant">Integer</span>, <span class="ruby-value str">"Number of seconds for the boss to sleep between checks of the queue (default 0.5)"</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">interval</span><span class="ruby-operator">|</span>
|
304
|
+
31: <span class="ruby-ivar">@sleep_interval</span> = <span class="ruby-identifier">interval</span>
|
305
|
+
32: <span class="ruby-keyword kw">end</span>
|
306
|
+
33:
|
307
|
+
34: <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">on</span>(<span class="ruby-value str">"-c"</span>, <span class="ruby-value str">"--child-limit LIMIT"</span>, <span class="ruby-constant">Integer</span>, <span class="ruby-value str">"Maximum number of employees (default 4)"</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">limit</span><span class="ruby-operator">|</span>
|
308
|
+
35: <span class="ruby-ivar">@employee_limit</span> = <span class="ruby-identifier">limit</span>
|
309
|
+
36: <span class="ruby-keyword kw">end</span>
|
310
|
+
37: <span class="ruby-keyword kw">end</span>.<span class="ruby-identifier">parse!</span>(<span class="ruby-identifier">argv</span>)
|
311
|
+
38: <span class="ruby-keyword kw">end</span></pre>
|
312
|
+
</div>
|
313
|
+
|
314
|
+
</div>
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
</div>
|
320
|
+
|
321
|
+
|
322
|
+
</div>
|
323
|
+
|
324
|
+
|
325
|
+
</div>
|
326
|
+
|
327
|
+
|
328
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
329
|
+
|
330
|
+
<p>Disabled; run with --debug to generate this.</p>
|
331
|
+
|
332
|
+
</div>
|
333
|
+
|
334
|
+
<div id="validator-badges">
|
335
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
336
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
337
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
338
|
+
</div>
|
339
|
+
|
340
|
+
</body>
|
341
|
+
</html>
|
342
|
+
|