Skip to content

Commit

Permalink
Deploy preview for PR 248 🛫
Browse files Browse the repository at this point in the history
  • Loading branch information
woile committed Nov 27, 2024
1 parent 98d5f09 commit e353c9b
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 30 deletions.
56 changes: 32 additions & 24 deletions pr-preview/pr-248/middleware/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,15 @@ <h1 id="middleware">Middleware</h1>
<span class="normal">25</span>
<span class="normal">26</span>
<span class="normal">27</span>
<span class="normal">28</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">class</span> <span class="nc">MiddlewareProtocol</span><span class="p">(</span><span class="n">typing</span><span class="o">.</span><span class="n">Protocol</span><span class="p">):</span>
<span class="normal">28</span>
<span class="normal">29</span>
<span class="normal">30</span>
<span class="normal">31</span>
<span class="normal">32</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">class</span> <span class="nc">MiddlewareProtocol</span><span class="p">(</span><span class="n">typing</span><span class="o">.</span><span class="n">Protocol</span><span class="p">):</span>
<span class="n">next_call</span><span class="p">:</span> <span class="n">types</span><span class="o">.</span><span class="n">NextMiddlewareCall</span>
<span class="n">send</span><span class="p">:</span> <span class="n">types</span><span class="o">.</span><span class="n">Send</span>
<span class="n">stream</span><span class="p">:</span> <span class="s2">&quot;Stream&quot;</span>

<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span>
<span class="o">*</span><span class="p">,</span>
Expand Down Expand Up @@ -946,15 +954,7 @@ <h2 id="default-middleware">Default Middleware</h2>

<details class="quote">
<summary>Source code in <code>kstreams/middleware/middleware.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"> 63</span>
<span class="normal"> 64</span>
<span class="normal"> 65</span>
<span class="normal"> 66</span>
<span class="normal"> 67</span>
<span class="normal"> 68</span>
<span class="normal"> 69</span>
<span class="normal"> 70</span>
<span class="normal"> 71</span>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"> 71</span>
<span class="normal"> 72</span>
<span class="normal"> 73</span>
<span class="normal"> 74</span>
Expand Down Expand Up @@ -1030,7 +1030,15 @@ <h2 id="default-middleware">Default Middleware</h2>
<span class="normal">144</span>
<span class="normal">145</span>
<span class="normal">146</span>
<span class="normal">147</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">class</span> <span class="nc">ExceptionMiddleware</span><span class="p">(</span><span class="n">BaseMiddleware</span><span class="p">):</span>
<span class="normal">147</span>
<span class="normal">148</span>
<span class="normal">149</span>
<span class="normal">150</span>
<span class="normal">151</span>
<span class="normal">152</span>
<span class="normal">153</span>
<span class="normal">154</span>
<span class="normal">155</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">class</span> <span class="nc">ExceptionMiddleware</span><span class="p">(</span><span class="n">BaseMiddleware</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> This is always the first Middleware in the middleware stack</span>
<span class="sd"> to catch any exception that might occur. Any exception raised</span>
Expand Down Expand Up @@ -1062,7 +1070,7 @@ <h2 id="default-middleware">Default Middleware</h2>

<span class="k">async</span> <span class="k">def</span> <span class="nf">cleanup_policy</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">exc</span><span class="p">:</span> <span class="ne">Exception</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Execute clenup policicy according to the Stream configuration.</span>
<span class="sd"> Execute cleanup policy according to the Stream configuration.</span>

<span class="sd"> At this point we are inside the asyncio.Lock `is_processing`</span>
<span class="sd"> as an event is being processed and an exeption has occured.</span>
Expand Down Expand Up @@ -1145,7 +1153,7 @@ <h2 id="kstreams.middleware.middleware.ExceptionMiddleware.cleanup_policy" class

<div class="doc doc-contents ">

<p>Execute clenup policicy according to the Stream configuration.</p>
<p>Execute cleanup policy according to the Stream configuration.</p>
<p>At this point we are inside the asyncio.Lock <code>is_processing</code>
as an event is being processed and an exeption has occured.
The Lock must be released to stop the Stream
Expand Down Expand Up @@ -1224,15 +1232,7 @@ <h2 id="kstreams.middleware.middleware.ExceptionMiddleware.cleanup_policy" class

<details class="quote">
<summary>Source code in <code>kstreams/middleware/middleware.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"> 93</span>
<span class="normal"> 94</span>
<span class="normal"> 95</span>
<span class="normal"> 96</span>
<span class="normal"> 97</span>
<span class="normal"> 98</span>
<span class="normal"> 99</span>
<span class="normal">100</span>
<span class="normal">101</span>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">101</span>
<span class="normal">102</span>
<span class="normal">103</span>
<span class="normal">104</span>
Expand Down Expand Up @@ -1278,9 +1278,17 @@ <h2 id="kstreams.middleware.middleware.ExceptionMiddleware.cleanup_policy" class
<span class="normal">144</span>
<span class="normal">145</span>
<span class="normal">146</span>
<span class="normal">147</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">async</span> <span class="k">def</span> <span class="nf">cleanup_policy</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">exc</span><span class="p">:</span> <span class="ne">Exception</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="normal">147</span>
<span class="normal">148</span>
<span class="normal">149</span>
<span class="normal">150</span>
<span class="normal">151</span>
<span class="normal">152</span>
<span class="normal">153</span>
<span class="normal">154</span>
<span class="normal">155</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">async</span> <span class="k">def</span> <span class="nf">cleanup_policy</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">exc</span><span class="p">:</span> <span class="ne">Exception</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Execute clenup policicy according to the Stream configuration.</span>
<span class="sd"> Execute cleanup policy according to the Stream configuration.</span>

<span class="sd"> At this point we are inside the asyncio.Lock `is_processing`</span>
<span class="sd"> as an event is being processed and an exeption has occured.</span>
Expand Down
2 changes: 1 addition & 1 deletion pr-preview/pr-248/search/search_index.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions pr-preview/pr-248/stream/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1711,10 +1711,7 @@ <h2 id="get-many">Get many</h2>

<details class="quote">
<summary>Source code in <code>kstreams/streams.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">294</span>
<span class="normal">295</span>
<span class="normal">296</span>
<span class="normal">297</span>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">297</span>
<span class="normal">298</span>
<span class="normal">299</span>
<span class="normal">300</span>
Expand Down Expand Up @@ -1752,7 +1749,10 @@ <h2 id="get-many">Get many</h2>
<span class="normal">332</span>
<span class="normal">333</span>
<span class="normal">334</span>
<span class="normal">335</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">async</span> <span class="k">def</span> <span class="nf">getmany</span><span class="p">(</span>
<span class="normal">335</span>
<span class="normal">336</span>
<span class="normal">337</span>
<span class="normal">338</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">async</span> <span class="k">def</span> <span class="nf">getmany</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span>
<span class="n">partitions</span><span class="p">:</span> <span class="n">typing</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="n">typing</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="n">TopicPartition</span><span class="p">]]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
<span class="n">timeout_ms</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span>
Expand Down

0 comments on commit e353c9b

Please sign in to comment.