disbatch 0.0.4
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/LICENSE +27 -0
- data/README +0 -0
- data/bin/disbatchd +74 -0
- data/disbatch_specification.txt +205 -0
- data/doc/Disbatch/NoNodeError.html +128 -0
- data/doc/Disbatch/Node.html +931 -0
- data/doc/Disbatch/Plugin/Hello.html +253 -0
- data/doc/Disbatch/Plugin.html +482 -0
- data/doc/Disbatch/Plugins.html +397 -0
- data/doc/Disbatch/Queue/Task.html +1671 -0
- data/doc/Disbatch/Queue.html +1043 -0
- data/doc/Disbatch.html +602 -0
- data/doc/Mongo.html +236 -0
- data/doc/_index.html +186 -0
- data/doc/class_list.html +47 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +55 -0
- data/doc/css/style.css +322 -0
- data/doc/file.README.html +66 -0
- data/doc/file_list.html +49 -0
- data/doc/frames.html +13 -0
- data/doc/index.html +66 -0
- data/doc/js/app.js +205 -0
- data/doc/js/full_list.js +167 -0
- data/doc/js/jquery.js +16 -0
- data/doc/method_list.html +446 -0
- data/doc/top-level-namespace.html +103 -0
- data/lib/disbatch/errors.rb +6 -0
- data/lib/disbatch/node.rb +105 -0
- data/lib/disbatch/plugin/hello.rb +33 -0
- data/lib/disbatch/plugin.rb +40 -0
- data/lib/disbatch/queue/task.rb +142 -0
- data/lib/disbatch/queue.rb +101 -0
- data/lib/disbatch.rb +61 -0
- metadata +147 -0
@@ -0,0 +1,482 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Module: Disbatch::Plugin
|
8
|
+
|
9
|
+
— Documentation by YARD 0.7.3
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
relpath = '..';
|
19
|
+
if (relpath != '') relpath += '/';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
25
|
+
|
26
|
+
|
27
|
+
</head>
|
28
|
+
<body>
|
29
|
+
<script type="text/javascript" charset="utf-8">
|
30
|
+
if (window.top.frames.main) document.body.className = 'frames';
|
31
|
+
</script>
|
32
|
+
|
33
|
+
<div id="header">
|
34
|
+
<div id="menu">
|
35
|
+
|
36
|
+
<a href="../_index.html">Index (P)</a> »
|
37
|
+
<span class='title'><span class='object_link'><a href="../Disbatch.html" title="Disbatch (module)">Disbatch</a></span></span>
|
38
|
+
»
|
39
|
+
<span class="title">Plugin</span>
|
40
|
+
|
41
|
+
|
42
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<div id="search">
|
46
|
+
|
47
|
+
<a id="class_list_link" href="#">Class List</a>
|
48
|
+
|
49
|
+
<a id="method_list_link" href="#">Method List</a>
|
50
|
+
|
51
|
+
<a id="file_list_link" href="#">File List</a>
|
52
|
+
|
53
|
+
</div>
|
54
|
+
<div class="clear"></div>
|
55
|
+
</div>
|
56
|
+
|
57
|
+
<iframe id="search_frame"></iframe>
|
58
|
+
|
59
|
+
<div id="content"><h1>Module: Disbatch::Plugin
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
</h1>
|
64
|
+
|
65
|
+
<dl class="box">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<dt class="r1">Extended by:</dt>
|
70
|
+
<dd class="r1"><span class='object_link'><a href="" title="Disbatch::Plugin (module)">Plugin</a></span></dd>
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
<dt class="r2">Included in:</dt>
|
78
|
+
<dd class="r2"><span class='object_link'><a href="" title="Disbatch::Plugin (module)">Plugin</a></span></dd>
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
<dt class="r1 last">Defined in:</dt>
|
83
|
+
<dd class="r1 last">lib/disbatch/plugin.rb</dd>
|
84
|
+
|
85
|
+
</dl>
|
86
|
+
<div class="clear"></div>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
91
|
+
<ul class="summary">
|
92
|
+
|
93
|
+
<li class="public ">
|
94
|
+
<span class="summary_signature">
|
95
|
+
|
96
|
+
<a href="#plugins-instance_method" title="#plugins (instance method)">- (Object) <strong>plugins</strong> </a>
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
</span>
|
101
|
+
|
102
|
+
|
103
|
+
<span class="note title readonly">readonly</span>
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
<span class="summary_desc"><div class='inline'><p>
|
113
|
+
Returns the value of attribute plugins.
|
114
|
+
</p>
|
115
|
+
</div></span>
|
116
|
+
|
117
|
+
</li>
|
118
|
+
|
119
|
+
|
120
|
+
</ul>
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
<h2>
|
127
|
+
Instance Method Summary
|
128
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
129
|
+
</h2>
|
130
|
+
|
131
|
+
<ul class="summary">
|
132
|
+
|
133
|
+
<li class="public ">
|
134
|
+
<span class="summary_signature">
|
135
|
+
|
136
|
+
<a href="#%5B%5D-instance_method" title="#[] (instance method)">- (Object) <strong>[]</strong>(name) </a>
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
</span>
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
<span class="summary_desc"><div class='inline'><p>
|
150
|
+
Return a plugin by name.
|
151
|
+
</p>
|
152
|
+
</div></span>
|
153
|
+
|
154
|
+
</li>
|
155
|
+
|
156
|
+
|
157
|
+
<li class="public ">
|
158
|
+
<span class="summary_signature">
|
159
|
+
|
160
|
+
<a href="#init-instance_method" title="#init (instance method)">- (Object) <strong>init</strong>(file) </a>
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
</span>
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
<span class="summary_desc"><div class='inline'><p>
|
174
|
+
Attempt to load a plugin file.
|
175
|
+
</p>
|
176
|
+
</div></span>
|
177
|
+
|
178
|
+
</li>
|
179
|
+
|
180
|
+
|
181
|
+
<li class="public ">
|
182
|
+
<span class="summary_signature">
|
183
|
+
|
184
|
+
<a href="#init_all-instance_method" title="#init_all (instance method)">- (Object) <strong>init_all</strong>(path) </a>
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
</span>
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
<span class="summary_desc"><div class='inline'><p>
|
198
|
+
Attempt to load all plugin files in a directory.
|
199
|
+
</p>
|
200
|
+
</div></span>
|
201
|
+
|
202
|
+
</li>
|
203
|
+
|
204
|
+
|
205
|
+
<li class="public ">
|
206
|
+
<span class="summary_signature">
|
207
|
+
|
208
|
+
<a href="#register-instance_method" title="#register (instance method)">- (Object) <strong>register</strong>(plugin) </a>
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
</span>
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
<span class="summary_desc"><div class='inline'><p>
|
222
|
+
Register a class as a plugin.
|
223
|
+
</p>
|
224
|
+
</div></span>
|
225
|
+
|
226
|
+
</li>
|
227
|
+
|
228
|
+
|
229
|
+
</ul>
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
<div id="instance_attr_details" class="attr_details">
|
234
|
+
<h2>Instance Attribute Details</h2>
|
235
|
+
|
236
|
+
|
237
|
+
<span id=""></span>
|
238
|
+
<span id="plugins-instance_method"></span>
|
239
|
+
<div class="method_details first">
|
240
|
+
<p class="signature first" id="plugins-instance_method">
|
241
|
+
|
242
|
+
- (<tt>Object</tt>) <strong>plugins</strong> <span class="extras">(readonly)</span>
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
</p><div class="docstring">
|
247
|
+
<div class="discussion">
|
248
|
+
<p>
|
249
|
+
Returns the value of attribute plugins
|
250
|
+
</p>
|
251
|
+
|
252
|
+
|
253
|
+
</div>
|
254
|
+
</div>
|
255
|
+
<div class="tags">
|
256
|
+
|
257
|
+
|
258
|
+
</div><table class="source_code">
|
259
|
+
<tr>
|
260
|
+
<td>
|
261
|
+
<pre class="lines">
|
262
|
+
|
263
|
+
|
264
|
+
4
|
265
|
+
5
|
266
|
+
6</pre>
|
267
|
+
</td>
|
268
|
+
<td>
|
269
|
+
<pre class="code"><span class="info file"># File 'lib/disbatch/plugin.rb', line 4</span>
|
270
|
+
|
271
|
+
<span class='def def kw'>def</span> <span class='plugins identifier id'>plugins</span>
|
272
|
+
<span class='@plugins ivar id'>@plugins</span>
|
273
|
+
<span class='end end kw'>end</span>
|
274
|
+
</pre>
|
275
|
+
</td>
|
276
|
+
</tr>
|
277
|
+
</table>
|
278
|
+
</div>
|
279
|
+
|
280
|
+
</div>
|
281
|
+
|
282
|
+
|
283
|
+
<div id="instance_method_details" class="method_details_list">
|
284
|
+
<h2>Instance Method Details</h2>
|
285
|
+
|
286
|
+
|
287
|
+
<div class="method_details first">
|
288
|
+
<p class="signature first" id="[]-instance_method">
|
289
|
+
|
290
|
+
- (<tt>Object</tt>) <strong>[]</strong>(name)
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
</p><div class="docstring">
|
295
|
+
<div class="discussion">
|
296
|
+
<p>
|
297
|
+
Return a plugin by name
|
298
|
+
</p>
|
299
|
+
|
300
|
+
|
301
|
+
</div>
|
302
|
+
</div>
|
303
|
+
<div class="tags">
|
304
|
+
|
305
|
+
|
306
|
+
</div><table class="source_code">
|
307
|
+
<tr>
|
308
|
+
<td>
|
309
|
+
<pre class="lines">
|
310
|
+
|
311
|
+
|
312
|
+
19
|
313
|
+
20
|
314
|
+
21</pre>
|
315
|
+
</td>
|
316
|
+
<td>
|
317
|
+
<pre class="code"><span class="info file"># File 'lib/disbatch/plugin.rb', line 19</span>
|
318
|
+
|
319
|
+
<span class='def def kw'>def</span> <span class='aref op'>[]</span><span class='lparen token'>(</span><span class='name identifier id'>name</span><span class='rparen token'>)</span>
|
320
|
+
<span class='@plugins ivar id'>@plugins</span><span class='lbrack token'>[</span><span class='name identifier id'>name</span><span class='rbrack token'>]</span>
|
321
|
+
<span class='end end kw'>end</span>
|
322
|
+
</pre>
|
323
|
+
</td>
|
324
|
+
</tr>
|
325
|
+
</table>
|
326
|
+
</div>
|
327
|
+
|
328
|
+
<div class="method_details ">
|
329
|
+
<p class="signature " id="init-instance_method">
|
330
|
+
|
331
|
+
- (<tt>Object</tt>) <strong>init</strong>(file)
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
</p><div class="docstring">
|
336
|
+
<div class="discussion">
|
337
|
+
<p>
|
338
|
+
Attempt to load a plugin file
|
339
|
+
</p>
|
340
|
+
|
341
|
+
|
342
|
+
</div>
|
343
|
+
</div>
|
344
|
+
<div class="tags">
|
345
|
+
|
346
|
+
|
347
|
+
</div><table class="source_code">
|
348
|
+
<tr>
|
349
|
+
<td>
|
350
|
+
<pre class="lines">
|
351
|
+
|
352
|
+
|
353
|
+
24
|
354
|
+
25
|
355
|
+
26
|
356
|
+
27
|
357
|
+
28
|
358
|
+
29
|
359
|
+
30
|
360
|
+
31</pre>
|
361
|
+
</td>
|
362
|
+
<td>
|
363
|
+
<pre class="code"><span class="info file"># File 'lib/disbatch/plugin.rb', line 24</span>
|
364
|
+
|
365
|
+
<span class='def def kw'>def</span> <span class='init identifier id'>init</span><span class='lparen token'>(</span><span class='file identifier id'>file</span><span class='rparen token'>)</span>
|
366
|
+
<span class='begin begin kw'>begin</span>
|
367
|
+
<span class='load identifier id'>load</span> <span class='file identifier id'>file</span>
|
368
|
+
<span class='puts identifier id'>puts</span> <span class='dstring node'>"Loaded #{file}"</span>
|
369
|
+
<span class='rescue rescue kw'>rescue</span>
|
370
|
+
<span class='puts identifier id'>puts</span> <span class='dstring node'>"Error loading #{file}"</span>
|
371
|
+
<span class='end end kw'>end</span>
|
372
|
+
<span class='end end kw'>end</span>
|
373
|
+
</pre>
|
374
|
+
</td>
|
375
|
+
</tr>
|
376
|
+
</table>
|
377
|
+
</div>
|
378
|
+
|
379
|
+
<div class="method_details ">
|
380
|
+
<p class="signature " id="init_all-instance_method">
|
381
|
+
|
382
|
+
- (<tt>Object</tt>) <strong>init_all</strong>(path)
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
</p><div class="docstring">
|
387
|
+
<div class="discussion">
|
388
|
+
<p>
|
389
|
+
Attempt to load all plugin files in a directory
|
390
|
+
</p>
|
391
|
+
|
392
|
+
|
393
|
+
</div>
|
394
|
+
</div>
|
395
|
+
<div class="tags">
|
396
|
+
|
397
|
+
|
398
|
+
</div><table class="source_code">
|
399
|
+
<tr>
|
400
|
+
<td>
|
401
|
+
<pre class="lines">
|
402
|
+
|
403
|
+
|
404
|
+
34
|
405
|
+
35
|
406
|
+
36</pre>
|
407
|
+
</td>
|
408
|
+
<td>
|
409
|
+
<pre class="code"><span class="info file"># File 'lib/disbatch/plugin.rb', line 34</span>
|
410
|
+
|
411
|
+
<span class='def def kw'>def</span> <span class='init_all identifier id'>init_all</span><span class='lparen token'>(</span><span class='path identifier id'>path</span><span class='rparen token'>)</span>
|
412
|
+
<span class='Dir constant id'>Dir</span><span class='lbrack token'>[</span><span class='path identifier id'>path</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='file identifier id'>file</span><span class='bitor op'>|</span> <span class='init identifier id'>init</span><span class='lparen token'>(</span><span class='file identifier id'>file</span><span class='rparen token'>)</span> <span class='rbrace token'>}</span>
|
413
|
+
<span class='end end kw'>end</span>
|
414
|
+
</pre>
|
415
|
+
</td>
|
416
|
+
</tr>
|
417
|
+
</table>
|
418
|
+
</div>
|
419
|
+
|
420
|
+
<div class="method_details ">
|
421
|
+
<p class="signature " id="register-instance_method">
|
422
|
+
|
423
|
+
- (<tt>Object</tt>) <strong>register</strong>(plugin)
|
424
|
+
|
425
|
+
|
426
|
+
|
427
|
+
</p><div class="docstring">
|
428
|
+
<div class="discussion">
|
429
|
+
<p>
|
430
|
+
Register a class as a plugin
|
431
|
+
</p>
|
432
|
+
|
433
|
+
|
434
|
+
</div>
|
435
|
+
</div>
|
436
|
+
<div class="tags">
|
437
|
+
|
438
|
+
|
439
|
+
</div><table class="source_code">
|
440
|
+
<tr>
|
441
|
+
<td>
|
442
|
+
<pre class="lines">
|
443
|
+
|
444
|
+
|
445
|
+
9
|
446
|
+
10
|
447
|
+
11
|
448
|
+
12
|
449
|
+
13
|
450
|
+
14
|
451
|
+
15
|
452
|
+
16</pre>
|
453
|
+
</td>
|
454
|
+
<td>
|
455
|
+
<pre class="code"><span class="info file"># File 'lib/disbatch/plugin.rb', line 9</span>
|
456
|
+
|
457
|
+
<span class='def def kw'>def</span> <span class='register identifier id'>register</span><span class='lparen token'>(</span><span class='plugin identifier id'>plugin</span><span class='rparen token'>)</span>
|
458
|
+
<span class='name identifier id'>name</span> <span class='assign token'>=</span> <span class='plugin identifier id'>plugin</span><span class='dot token'>.</span><span class='to_s identifier id'>to_s</span>
|
459
|
+
|
460
|
+
<span class='return return kw'>return</span> <span class='false false kw'>false</span> <span class='unless unless_mod kw'>unless</span> <span class='plugin identifier id'>plugin</span><span class='dot token'>.</span><span class='respond_to? fid id'>respond_to?</span><span class='lparen token'>(</span><span class='symbol val'>:execute</span><span class='rparen token'>)</span>
|
461
|
+
|
462
|
+
<span class='@plugins ivar id'>@plugins</span><span class='lbrack token'>[</span><span class='name identifier id'>name</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='plugin identifier id'>plugin</span>
|
463
|
+
<span class='puts identifier id'>puts</span> <span class='dstring node'>"Registered #{name}"</span>
|
464
|
+
<span class='end end kw'>end</span>
|
465
|
+
</pre>
|
466
|
+
</td>
|
467
|
+
</tr>
|
468
|
+
</table>
|
469
|
+
</div>
|
470
|
+
|
471
|
+
</div>
|
472
|
+
|
473
|
+
</div>
|
474
|
+
|
475
|
+
<div id="footer">
|
476
|
+
Generated on Mon Oct 24 16:54:00 2011 by
|
477
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
478
|
+
0.7.3 (ruby-1.8.7).
|
479
|
+
</div>
|
480
|
+
|
481
|
+
</body>
|
482
|
+
</html>
|