aboutsummaryrefslogtreecommitdiffstats
path: root/router.html
diff options
context:
space:
mode:
Diffstat (limited to 'router.html')
-rwxr-xr-xrouter.html98
1 files changed, 61 insertions, 37 deletions
diff --git a/router.html b/router.html
index 59a2f38..9061409 100755
--- a/router.html
+++ b/router.html
@@ -13,6 +13,8 @@
13 13
14 14
15 15
16
17
16 18
17 19
18 20
@@ -45,6 +47,7 @@
45 47
46<body class="wy-body-for-nav" role="document"> 48<body class="wy-body-for-nav" role="document">
47 49
50
48 <div class="wy-grid-for-nav"> 51 <div class="wy-grid-for-nav">
49 52
50 53
@@ -64,7 +67,7 @@
64 67
65 68
66 <div class="version"> 69 <div class="version">
67 0.3.3 70 0.3.6
68 </div> 71 </div>
69 72
70 73
@@ -85,7 +88,10 @@
85 88
86 89
87 90
88 <ul class="current"> 91
92
93
94 <ul class="current">
89<li class="toctree-l1"><a class="reference internal" href="using.html">Using EventMQ</a></li> 95<li class="toctree-l1"><a class="reference internal" href="using.html">Using EventMQ</a></li>
90<li class="toctree-l1 current"><a class="reference internal" href="api.html">API Documentation</a><ul class="current"> 96<li class="toctree-l1 current"><a class="reference internal" href="api.html">API Documentation</a><ul class="current">
91<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> 97<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>
@@ -111,8 +117,10 @@
111 117
112 118
113 <nav class="wy-nav-top" role="navigation" aria-label="top navigation"> 119 <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
114 <i data-toggle="wy-nav-top" class="fa fa-bars"></i> 120
115 <a href="index.html">EventMQ</a> 121 <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
122 <a href="index.html">EventMQ</a>
123
116 </nav> 124 </nav>
117 125
118 126
@@ -121,25 +129,42 @@
121 <div class="rst-content"> 129 <div class="rst-content">
122 130
123 131
124 132
133
134
135
136
137
138
139
140
141
142
125 143
126 144
127 145
128<div role="navigation" aria-label="breadcrumbs navigation"> 146<div role="navigation" aria-label="breadcrumbs navigation">
147
129 <ul class="wy-breadcrumbs"> 148 <ul class="wy-breadcrumbs">
130 <li><a href="index.html">Docs</a> &raquo;</li> 149
131 150 <li><a href="index.html">Docs</a> &raquo;</li>
151
132 <li><a href="api.html">API Documentation</a> &raquo;</li> 152 <li><a href="api.html">API Documentation</a> &raquo;</li>
133 153
134 <li><code class="docutils literal"><span class="pre">router</span></code> &#8211; Router</li> 154 <li><code class="docutils literal"><span class="pre">router</span></code> &#8211; Router</li>
155
156
135 <li class="wy-breadcrumbs-aside"> 157 <li class="wy-breadcrumbs-aside">
136 158
137 159
138 <a href="_sources/router.rst.txt" rel="nofollow"> View page source</a> 160 <a href="_sources/router.rst.txt" rel="nofollow"> View page source</a>
139 161
140 162
141 </li> 163 </li>
164
142 </ul> 165 </ul>
166
167
143 <hr/> 168 <hr/>
144</div> 169</div>
145 <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> 170 <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
@@ -160,7 +185,7 @@
160<col class="field-name" /> 185<col class="field-name" />
161<col class="field-body" /> 186<col class="field-body" />
162<tbody valign="top"> 187<tbody valign="top">
163<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>scheduler_id</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) &#8211; unique id of the scheduler to add</td> 188<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>scheduler_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) &#8211; unique id of the scheduler to add</td>
164</tr> 189</tr>
165</tbody> 190</tbody>
166</table> 191</table>
@@ -175,7 +200,7 @@
175<col class="field-body" /> 200<col class="field-body" />
176<tbody valign="top"> 201<tbody valign="top">
177<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> 202<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
178<li><strong>worker_id</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) &#8211; unique id of the worker to add</li> 203<li><strong>worker_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) &#8211; unique id of the worker to add</li>
179<li><strong>queues</strong> &#8211; queue or queues this worker should be a member of</li> 204<li><strong>queues</strong> &#8211; queue or queues this worker should be a member of</li>
180</ul> 205</ul>
181</td> 206</td>
@@ -198,14 +223,6 @@ the router hasn&#8217;t received a heartbeat in HEARTBEAT_TIMEOUT</p>
198responded in HEARTBEAT_TIMEOUT</p> 223responded in HEARTBEAT_TIMEOUT</p>
199</dd></dl> 224</dd></dl>
200 225
201<dl class="attribute">
202<dt id="eventmq.router.Router.executed_functions">
203<code class="descname">executed_functions</code><em class="property"> = None</em><a class="headerlink" href="#eventmq.router.Router.executed_functions" title="Permalink to this definition">¶</a></dt>
204<dd><p>Excecuted function tracking dictionary
205Key: msgid of msg each REQUEST received and forwarded to a worker
206Value: (function_name, queue_name)</p>
207</dd></dl>
208
209<dl class="method"> 226<dl class="method">
210<dt id="eventmq.router.Router.get_available_worker"> 227<dt id="eventmq.router.Router.get_available_worker">
211<code class="descname">get_available_worker</code><span class="sig-paren">(</span><em>queue_name='default'</em><span class="sig-paren">)</span><a class="headerlink" href="#eventmq.router.Router.get_available_worker" title="Permalink to this definition">¶</a></dt> 228<code class="descname">get_available_worker</code><span class="sig-paren">(</span><em>queue_name='default'</em><span class="sig-paren">)</span><a class="headerlink" href="#eventmq.router.Router.get_available_worker" title="Permalink to this definition">¶</a></dt>
@@ -215,7 +232,7 @@ queue.</p>
215<col class="field-name" /> 232<col class="field-name" />
216<col class="field-body" /> 233<col class="field-body" />
217<tbody valign="top"> 234<tbody valign="top">
218<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>queue_name</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) &#8211; Name of the queue</p> 235<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>queue_name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) &#8211; Name of the queue</p>
219</td> 236</td>
220</tr> 237</tr>
221<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first simple"> 238<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><ul class="first simple">
@@ -229,7 +246,7 @@ self.queues</li>
229<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">uuid of the job manager with an available worker slot</p> 246<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">uuid of the job manager with an available worker slot</p>
230</td> 247</td>
231</tr> 248</tr>
232<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">(<a class="reference external" href="https://docs.python.org/2/library/functions.html#str" title="(in Python v2.7)">str</a>)</p> 249<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">(<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)">str</a>)</p>
233</td> 250</td>
234</tr> 251</tr>
235</tbody> 252</tbody>
@@ -284,8 +301,8 @@ and announces itself.</p>
284<col class="field-body" /> 301<col class="field-body" />
285<tbody valign="top"> 302<tbody valign="top">
286<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> 303<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
287<li><strong>sender</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) &#8211; The id of the sender</li> 304<li><strong>sender</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) &#8211; The id of the sender</li>
288<li><strong>msgid</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) &#8211; Unique identifier for this message</li> 305<li><strong>msgid</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) &#8211; Unique identifier for this message</li>
289<li><strong>msg</strong> &#8211; The actual message that was sent</li> 306<li><strong>msg</strong> &#8211; The actual message that was sent</li>
290</ul> 307</ul>
291</td> 308</td>
@@ -313,7 +330,7 @@ measurements</p>
313<li><strong>sender</strong> &#8211; </li> 330<li><strong>sender</strong> &#8211; </li>
314<li><strong>msgid</strong> &#8211; </li> 331<li><strong>msgid</strong> &#8211; </li>
315<li><strong>msgid</strong> &#8211; </li> 332<li><strong>msgid</strong> &#8211; </li>
316<li><strong>depth</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#int" title="(in Python v2.7)"><em>int</em></a>) &#8211; The recusion depth in retrying when PeerGoneAwayError 333<li><strong>depth</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.7)"><em>int</em></a>) &#8211; The recusion depth in retrying when PeerGoneAwayError
317is raised.</li> 334is raised.</li>
318</ul> 335</ul>
319</td> 336</td>
@@ -330,7 +347,7 @@ is raised.</li>
330<col class="field-name" /> 347<col class="field-name" />
331<col class="field-body" /> 348<col class="field-body" />
332<tbody valign="top"> 349<tbody valign="top">
333<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>unprioritized_iterable</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#iter" title="(in Python v2.7)"><em>iter</em></a>) &#8211; Any list, tuple, etc where the 350<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>unprioritized_iterable</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#iter" title="(in Python v3.7)"><em>iter</em></a>) &#8211; Any list, tuple, etc where the
3340-index key is an integer to use as priority. Largest numbers 3510-index key is an integer to use as priority. Largest numbers
335come first.</td> 352come first.</td>
336</tr> 353</tr>
@@ -393,7 +410,10 @@ worker slot, so you may see duplicate addresses.</p>
393<dl class="attribute"> 410<dl class="attribute">
394<dt id="eventmq.router.Router.received_disconnect"> 411<dt id="eventmq.router.Router.received_disconnect">
395<code class="descname">received_disconnect</code><em class="property"> = None</em><a class="headerlink" href="#eventmq.router.Router.received_disconnect" title="Permalink to this definition">¶</a></dt> 412<code class="descname">received_disconnect</code><em class="property"> = None</em><a class="headerlink" href="#eventmq.router.Router.received_disconnect" title="Permalink to this definition">¶</a></dt>
396<dd><p>Set to True when the router should die.</p> 413<dd><p>Excecuted function tracking dictionary
414Key: msgid of msg each REQUEST received and forwarded to a worker
415Value: (function_name, queue_name)
416Set to True when the router should die.</p>
397</dd></dl> 417</dd></dl>
398 418
399<dl class="method"> 419<dl class="method">
@@ -445,8 +465,8 @@ Contains dictionaries:</p>
445<col class="field-body" /> 465<col class="field-body" />
446<tbody valign="top"> 466<tbody valign="top">
447<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> 467<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
448<li><strong>socket</strong> (<a class="reference external" href="https://docs.python.org/2/library/socket.html#module-socket" title="(in Python v2.7)"><em>socket</em></a>) &#8211; The socket to use for this ack</li> 468<li><strong>socket</strong> (<a class="reference external" href="https://docs.python.org/3/library/socket.html#module-socket" title="(in Python v3.7)"><em>socket</em></a>) &#8211; The socket to use for this ack</li>
449<li><strong>recipient</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) &#8211; The recipient id for the ack</li> 469<li><strong>recipient</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) &#8211; The recipient id for the ack</li>
450<li><strong>msgid</strong> &#8211; The unique id that we are acknowledging</li> 470<li><strong>msgid</strong> &#8211; The unique id that we are acknowledging</li>
451</ul> 471</ul>
452</td> 472</td>
@@ -471,8 +491,8 @@ needed when building messages</p>
471<col class="field-body" /> 491<col class="field-body" />
472<tbody valign="top"> 492<tbody valign="top">
473<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> 493<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
474<li><strong>socket</strong> (<a class="reference external" href="https://docs.python.org/2/library/socket.html#module-socket" title="(in Python v2.7)"><em>socket</em></a>) &#8211; the socket to send the heartbeat with</li> 494<li><strong>socket</strong> (<a class="reference external" href="https://docs.python.org/3/library/socket.html#module-socket" title="(in Python v3.7)"><em>socket</em></a>) &#8211; the socket to send the heartbeat with</li>
475<li><strong>recipient</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) &#8211; Worker I</li> 495<li><strong>recipient</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) &#8211; Worker I</li>
476</ul> 496</ul>
477</td> 497</td>
478</tr> 498</tr>
@@ -514,9 +534,9 @@ process receives a SIGHUP from the system.</p>
514<col class="field-body" /> 534<col class="field-body" />
515<tbody valign="top"> 535<tbody valign="top">
516<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> 536<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
517<li><strong>frontend_addr</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) &#8211; connection string to listen for requests</li> 537<li><strong>frontend_addr</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) &#8211; connection string to listen for requests</li>
518<li><strong>backend_addr</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) &#8211; connection string to listen for workers</li> 538<li><strong>backend_addr</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) &#8211; connection string to listen for workers</li>
519<li><strong>administrative_addr</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) &#8211; connection string to listen for emq-cli 539<li><strong>administrative_addr</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) &#8211; connection string to listen for emq-cli
520commands on.</li> 540commands on.</li>
521</ul> 541</ul>
522</td> 542</td>
@@ -558,15 +578,18 @@ process.</li>
558 578
559 579
560 </div> 580 </div>
581 <div class="articleComments">
582
583 </div>
561 </div> 584 </div>
562 <footer> 585 <footer>
563 586
564 <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> 587 <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
565 588
566 <a href="sender.html" class="btn btn-neutral float-right" title="sender – Sender" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a> 589 <a href="sender.html" class="btn btn-neutral float-right" title="sender – Sender" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
567 590
568 591
569 <a href="receiver.html" class="btn btn-neutral" title="receiver – Receiver" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a> 592 <a href="receiver.html" class="btn btn-neutral" title="receiver – Receiver" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
570 593
571 </div> 594 </div>
572 595
@@ -600,7 +623,8 @@ process.</li>
600 VERSION:'0', 623 VERSION:'0',
601 COLLAPSE_INDEX:false, 624 COLLAPSE_INDEX:false,
602 FILE_SUFFIX:'.html', 625 FILE_SUFFIX:'.html',
603 HAS_SOURCE: true 626 HAS_SOURCE: true,
627 SOURCELINK_SUFFIX: '.txt'
604 }; 628 };
605 </script> 629 </script>
606 <script type="text/javascript" src="_static/jquery.js"></script> 630 <script type="text/javascript" src="_static/jquery.js"></script>