aboutsummaryrefslogtreecommitdiffstats
path: root/router.html
diff options
context:
space:
mode:
authorjason2016-05-24 20:19:12 -0600
committerjason2016-05-24 20:19:12 -0600
commit8a8396c454206feb589a806db2ddf8a03d2d757e (patch)
treef68b67d98bea14d0f15b0e11e3fe2c81a5376a9c /router.html
parent8fc4bcc96063b29d0726feb7a72b28acf01b109c (diff)
downloadeventmq-8a8396c454206feb589a806db2ddf8a03d2d757e.tar.gz
eventmq-8a8396c454206feb589a806db2ddf8a03d2d757e.zip
0.2.1 update
Diffstat (limited to 'router.html')
-rw-r--r--router.html78
1 files changed, 54 insertions, 24 deletions
diff --git a/router.html b/router.html
index 896c4a6..86fe30d 100644
--- a/router.html
+++ b/router.html
@@ -61,7 +61,7 @@
61 61
62 62
63 <div class="version"> 63 <div class="version">
64 0 64 0.2.1
65 </div> 65 </div>
66 66
67 67
@@ -83,6 +83,7 @@
83 83
84 84
85 <ul class="current"> 85 <ul class="current">
86<li class="toctree-l1"><a class="reference internal" href="using.html">Using EventMQ</a></li>
86<li class="toctree-l1 current"><a class="reference internal" href="api.html">API Documentation</a><ul class="current"> 87<li class="toctree-l1 current"><a class="reference internal" href="api.html">API Documentation</a><ul class="current">
87<li class="toctree-l2"><a class="reference internal" href="client.html"><code class="docutils literal"><span class="pre">client</span></code> &#8211; Client Utilities</a></li> 88<li class="toctree-l2"><a class="reference internal" href="client.html"><code class="docutils literal"><span class="pre">client</span></code> &#8211; Client Utilities</a></li>
88<li class="toctree-l2"><a class="reference internal" href="exceptions.html"><code class="docutils literal"><span class="pre">exceptions</span></code> &#8211; Exceptions</a></li> 89<li class="toctree-l2"><a class="reference internal" href="exceptions.html"><code class="docutils literal"><span class="pre">exceptions</span></code> &#8211; Exceptions</a></li>
@@ -91,7 +92,7 @@
91<li class="toctree-l2"><a class="reference internal" href="receiver.html"><code class="docutils literal"><span class="pre">receiver</span></code> &#8211; Receiver</a></li> 92<li class="toctree-l2"><a class="reference internal" href="receiver.html"><code class="docutils literal"><span class="pre">receiver</span></code> &#8211; Receiver</a></li>
92<li class="toctree-l2 current"><a class="current reference internal" href=""><code class="docutils literal"><span class="pre">router</span></code> &#8211; Router</a></li> 93<li class="toctree-l2 current"><a class="current reference internal" href=""><code class="docutils literal"><span class="pre">router</span></code> &#8211; Router</a></li>
93<li class="toctree-l2"><a class="reference internal" href="sender.html"><code class="docutils literal"><span class="pre">sender</span></code> &#8211; Sender</a></li> 94<li class="toctree-l2"><a class="reference internal" href="sender.html"><code class="docutils literal"><span class="pre">sender</span></code> &#8211; Sender</a></li>
94<li class="toctree-l2"><a class="reference internal" href="utils/index.html"><code class="docutils literal"><span class="pre">utils</span></code> - Utilities</a></li> 95<li class="toctree-l2"><a class="reference internal" href="utils/index.html"><code class="docutils literal"><span class="pre">utils</span></code> &#8211; Utilities</a></li>
95</ul> 96</ul>
96</li> 97</li>
97<li class="toctree-l1"><a class="reference internal" href="contributing.html">Contributing to EventMQ</a></li> 98<li class="toctree-l1"><a class="reference internal" href="contributing.html">Contributing to EventMQ</a></li>
@@ -259,24 +260,26 @@ and announces itself.</p>
259</dd></dl> 260</dd></dl>
260 261
261<dl class="method"> 262<dl class="method">
262<dt id="eventmq.router.Router.on_receive_request"> 263<dt id="eventmq.router.Router.on_request">
263<code class="descname">on_receive_request</code><span class="sig-paren">(</span><em>msg</em>, <em>depth=0</em><span class="sig-paren">)</span><a class="headerlink" href="#eventmq.router.Router.on_receive_request" title="Permalink to this definition">¶</a></dt> 264<code class="descname">on_request</code><span class="sig-paren">(</span><em>sender</em>, <em>msgid</em>, <em>msg</em>, <em>depth=1</em><span class="sig-paren">)</span><a class="headerlink" href="#eventmq.router.Router.on_request" title="Permalink to this definition">¶</a></dt>
264<dd><table class="docutils field-list" frame="void" rules="none"> 265<dd><p>Process a client REQUEST frame</p>
266<table class="docutils field-list" frame="void" rules="none">
265<col class="field-name" /> 267<col class="field-name" />
266<col class="field-body" /> 268<col class="field-body" />
267<tbody valign="top"> 269<tbody valign="top">
268<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>msg</strong> &#8211; The untouched message from zmq</td> 270<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
271<li><strong>sender</strong> &#8211; </li>
272<li><strong>msgid</strong> &#8211; </li>
273<li><strong>msgid</strong> &#8211; </li>
274<li><strong>depth</strong> (<a class="reference external" href="https://docs.python.org/library/functions.html#int" title="(in Python v2.7)"><em>int</em></a>) &#8211; The recusion depth in retrying when PeerGoneAwayError
275is raised.</li>
276</ul>
277</td>
269</tr> 278</tr>
270</tbody> 279</tbody>
271</table> 280</table>
272</dd></dl> 281</dd></dl>
273 282
274<dl class="method">
275<dt id="eventmq.router.Router.on_request">
276<code class="descname">on_request</code><span class="sig-paren">(</span><em>sender</em>, <em>msgid</em>, <em>msg</em><span class="sig-paren">)</span><a class="headerlink" href="#eventmq.router.Router.on_request" title="Permalink to this definition">¶</a></dt>
277<dd><p>Process a client REQUEST frame</p>
278</dd></dl>
279
280<dl class="classmethod"> 283<dl class="classmethod">
281<dt id="eventmq.router.Router.prioritize_queue_list"> 284<dt id="eventmq.router.Router.prioritize_queue_list">
282<em class="property">classmethod </em><code class="descname">prioritize_queue_list</code><span class="sig-paren">(</span><em>unprioritized_iterable</em><span class="sig-paren">)</span><a class="headerlink" href="#eventmq.router.Router.prioritize_queue_list" title="Permalink to this definition">¶</a></dt> 285<em class="property">classmethod </em><code class="descname">prioritize_queue_list</code><span class="sig-paren">(</span><em>unprioritized_iterable</em><span class="sig-paren">)</span><a class="headerlink" href="#eventmq.router.Router.prioritize_queue_list" title="Permalink to this definition">¶</a></dt>
@@ -291,8 +294,28 @@ come first.</td>
291</tr> 294</tr>
292<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body">IndexError - There was no 0-index element.</td> 295<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body">IndexError - There was no 0-index element.</td>
293</tr> 296</tr>
294<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">sorted <code class="xref py py-class docutils literal"><span class="pre">EMQdeque</span></code> with largest priorites being indexed 297<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">decsending order list. E.g. ((20, &#8216;a&#8217;), (14, &#8216;b&#8217;), (12, &#8216;c&#8217;))</td>
295smaller. E.g. ((20,&#8217;a&#8217; ), (14, &#8216;b&#8217;), (&#8216;12&#8217;, c))</td> 298</tr>
299</tbody>
300</table>
301</dd></dl>
302
303<dl class="method">
304<dt id="eventmq.router.Router.process_client_message">
305<code class="descname">process_client_message</code><span class="sig-paren">(</span><em>original_msg</em>, <em>depth=0</em><span class="sig-paren">)</span><a class="headerlink" href="#eventmq.router.Router.process_client_message" title="Permalink to this definition">¶</a></dt>
306<dd><table class="docutils field-list" frame="void" rules="none">
307<col class="field-name" />
308<col class="field-body" />
309<tbody valign="top">
310<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
311<li><strong>msg</strong> &#8211; The untouched message from zmq</li>
312<li><strong>depth</strong> &#8211; The number of times this method has been recursively
313called. This is used to short circuit message retry attempts.</li>
314</ul>
315</td>
316</tr>
317<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><code class="xref py py-exc docutils literal"><span class="pre">InvalidMessageError</span></code> &#8211; Unable to parse the message</p>
318</td>
296</tr> 319</tr>
297</tbody> 320</tbody>
298</table> 321</table>
@@ -314,12 +337,6 @@ a warning is created.</p>
314</table> 337</table>
315</dd></dl> 338</dd></dl>
316 339
317<dl class="method">
318<dt id="eventmq.router.Router.queue_message">
319<code class="descname">queue_message</code><span class="sig-paren">(</span><em>msg</em><span class="sig-paren">)</span><a class="headerlink" href="#eventmq.router.Router.queue_message" title="Permalink to this definition">¶</a></dt>
320<dd><p>Add a message to the queue for processing later</p>
321</dd></dl>
322
323<dl class="attribute"> 340<dl class="attribute">
324<dt id="eventmq.router.Router.queues"> 341<dt id="eventmq.router.Router.queues">
325<code class="descname">queues</code><em class="property"> = None</em><a class="headerlink" href="#eventmq.router.Router.queues" title="Permalink to this definition">¶</a></dt> 342<code class="descname">queues</code><em class="property"> = None</em><a class="headerlink" href="#eventmq.router.Router.queues" title="Permalink to this definition">¶</a></dt>
@@ -385,13 +402,19 @@ Contains dictionaries:</p>
385<col class="field-name" /> 402<col class="field-name" />
386<col class="field-body" /> 403<col class="field-body" />
387<tbody valign="top"> 404<tbody valign="top">
388<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> 405<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
389<li><strong>socket</strong> (<a class="reference external" href="https://docs.python.org/library/socket.html#module-socket" title="(in Python v2.7)"><em>socket</em></a>) &#8211; The socket to use for this ack</li> 406<li><strong>socket</strong> (<a class="reference external" href="https://docs.python.org/library/socket.html#module-socket" title="(in Python v2.7)"><em>socket</em></a>) &#8211; The socket to use for this ack</li>
390<li><strong>recipient</strong> (<a class="reference external" href="https://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) &#8211; The recipient id for the ack</li> 407<li><strong>recipient</strong> (<a class="reference external" href="https://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) &#8211; The recipient id for the ack</li>
391<li><strong>msgid</strong> &#8211; The unique id that we are acknowledging</li> 408<li><strong>msgid</strong> &#8211; The unique id that we are acknowledging</li>
392</ul> 409</ul>
393</td> 410</td>
394</tr> 411</tr>
412<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The ID of the ACK message</p>
413</td>
414</tr>
415<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">msgid</p>
416</td>
417</tr>
395</tbody> 418</tbody>
396</table> 419</table>
397</dd></dl> 420</dd></dl>
@@ -405,12 +428,18 @@ needed when building messages</p>
405<col class="field-name" /> 428<col class="field-name" />
406<col class="field-body" /> 429<col class="field-body" />
407<tbody valign="top"> 430<tbody valign="top">
408<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> 431<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
409<li><strong>socket</strong> (<a class="reference external" href="https://docs.python.org/library/socket.html#module-socket" title="(in Python v2.7)"><em>socket</em></a>) &#8211; the socket to send the heartbeat with</li> 432<li><strong>socket</strong> (<a class="reference external" href="https://docs.python.org/library/socket.html#module-socket" title="(in Python v2.7)"><em>socket</em></a>) &#8211; the socket to send the heartbeat with</li>
410<li><strong>recipient</strong> (<a class="reference external" href="https://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) &#8211; Worker I</li> 433<li><strong>recipient</strong> (<a class="reference external" href="https://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) &#8211; Worker I</li>
411</ul> 434</ul>
412</td> 435</td>
413</tr> 436</tr>
437<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The ID of the HEARTBEAT message</p>
438</td>
439</tr>
440<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">msgid</p>
441</td>
442</tr>
414</tbody> 443</tbody>
415</table> 444</table>
416</dd></dl> 445</dd></dl>
@@ -468,7 +497,8 @@ here.</p>
468<dl class="docutils"> 497<dl class="docutils">
469<dt><strong>Keys</strong></dt> 498<dt><strong>Keys</strong></dt>
470<dd><ul class="first last simple"> 499<dd><ul class="first last simple">
471<li><code class="docutils literal"><span class="pre">queues</span></code>: list() of queues the worker belongs to</li> 500<li><code class="docutils literal"><span class="pre">queues</span></code>: list() of queue names and prioritiess the worker
501belongs to. e.g. (10, &#8216;default&#8217;)</li>
472<li><code class="docutils literal"><span class="pre">hb</span></code>: monotonic timestamp of the last received message from 502<li><code class="docutils literal"><span class="pre">hb</span></code>: monotonic timestamp of the last received message from
473worker</li> 503worker</li>
474<li><code class="docutils literal"><span class="pre">available_slots</span></code>: int count of jobs this manager can still 504<li><code class="docutils literal"><span class="pre">available_slots</span></code>: int count of jobs this manager can still
@@ -501,7 +531,7 @@ process.</li>
501 531
502 <div role="contentinfo"> 532 <div role="contentinfo">
503 <p> 533 <p>
504 &copy; Copyright 2015, eventboard.io. 534 &copy; Copyright 2016, eventboard.io.
505 535
506 </p> 536 </p>
507 </div> 537 </div>