Skip to content

Commit

Permalink
Update unreleased documentation (#427)
Browse files Browse the repository at this point in the history
* Update versions.json

* Deployed 6d4dc39 to unreleased in versions with MkDocs 1.5.3 and mike 1.1.2

* Sort docs versions

---------

Co-authored-by: GitHub Actions Bot <[email protected]>
  • Loading branch information
github-actions[bot] and GitHub Actions Bot authored Oct 12, 2023
1 parent 455c5b1 commit 6ad747d
Show file tree
Hide file tree
Showing 11 changed files with 895 additions and 620 deletions.
50 changes: 39 additions & 11 deletions versions/unreleased/api-ref/prefect/agent/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7474,7 +7474,14 @@ <h2 id="prefect.agent.PrefectAgent" class="doc doc-heading">
<span class="normal">680</span>
<span class="normal">681</span>
<span class="normal">682</span>
<span class="normal">683</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">class</span> <span class="nc">PrefectAgent</span><span class="p">:</span>
<span class="normal">683</span>
<span class="normal">684</span>
<span class="normal">685</span>
<span class="normal">686</span>
<span class="normal">687</span>
<span class="normal">688</span>
<span class="normal">689</span>
<span class="normal">690</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">class</span> <span class="nc">PrefectAgent</span><span class="p">:</span>
<span class="nd">@experimental_parameter</span><span class="p">(</span>
<span class="s2">&quot;work_pool_name&quot;</span><span class="p">,</span> <span class="n">group</span><span class="o">=</span><span class="s2">&quot;work_pools&quot;</span><span class="p">,</span> <span class="n">when</span><span class="o">=</span><span class="k">lambda</span> <span class="n">y</span><span class="p">:</span> <span class="n">y</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span>
<span class="p">)</span>
Expand Down Expand Up @@ -7772,6 +7779,13 @@ <h2 id="prefect.agent.PrefectAgent" class="doc doc-heading">

<span class="k">try</span><span class="p">:</span>
<span class="n">infrastructure</span> <span class="o">=</span> <span class="k">await</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_infrastructure</span><span class="p">(</span><span class="n">flow_run</span><span class="p">)</span>
<span class="k">if</span> <span class="n">infrastructure</span><span class="o">.</span><span class="n">is_using_a_runner</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span>
<span class="sa">f</span><span class="s2">&quot;Skipping cancellation because flow run </span><span class="si">{</span><span class="nb">str</span><span class="p">(</span><span class="n">flow_run</span><span class="o">.</span><span class="n">id</span><span class="p">)</span><span class="si">!r}</span><span class="s2"> is&quot;</span>
<span class="s2">&quot; using enhanced cancellation. A dedicated runner will handle&quot;</span>
<span class="s2">&quot; cancellation.&quot;</span>
<span class="p">)</span>
<span class="k">return</span>
<span class="k">except</span> <span class="ne">Exception</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">logger</span><span class="o">.</span><span class="n">exception</span><span class="p">(</span>
<span class="sa">f</span><span class="s2">&quot;Failed to get infrastructure for flow run &#39;</span><span class="si">{</span><span class="n">flow_run</span><span class="o">.</span><span class="n">id</span><span class="si">}</span><span class="s2">&#39;. &quot;</span>
Expand Down Expand Up @@ -8208,7 +8222,14 @@ <h3 id="prefect.agent.PrefectAgent.cancel_run" class="doc doc-heading">
<span class="normal">380</span>
<span class="normal">381</span>
<span class="normal">382</span>
<span class="normal">383</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">cancel_run</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">flow_run</span><span class="p">:</span> <span class="n">FlowRun</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="normal">383</span>
<span class="normal">384</span>
<span class="normal">385</span>
<span class="normal">386</span>
<span class="normal">387</span>
<span class="normal">388</span>
<span class="normal">389</span>
<span class="normal">390</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">cancel_run</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">flow_run</span><span class="p">:</span> <span class="n">FlowRun</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"> Cancel a flow run by killing its infrastructure</span>
<span class="sd"> &quot;&quot;&quot;</span>
Expand All @@ -8230,6 +8251,13 @@ <h3 id="prefect.agent.PrefectAgent.cancel_run" class="doc doc-heading">

<span class="k">try</span><span class="p">:</span>
<span class="n">infrastructure</span> <span class="o">=</span> <span class="k">await</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_infrastructure</span><span class="p">(</span><span class="n">flow_run</span><span class="p">)</span>
<span class="k">if</span> <span class="n">infrastructure</span><span class="o">.</span><span class="n">is_using_a_runner</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span>
<span class="sa">f</span><span class="s2">&quot;Skipping cancellation because flow run </span><span class="si">{</span><span class="nb">str</span><span class="p">(</span><span class="n">flow_run</span><span class="o">.</span><span class="n">id</span><span class="p">)</span><span class="si">!r}</span><span class="s2"> is&quot;</span>
<span class="s2">&quot; using enhanced cancellation. A dedicated runner will handle&quot;</span>
<span class="s2">&quot; cancellation.&quot;</span>
<span class="p">)</span>
<span class="k">return</span>
<span class="k">except</span> <span class="ne">Exception</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">logger</span><span class="o">.</span><span class="n">exception</span><span class="p">(</span>
<span class="sa">f</span><span class="s2">&quot;Failed to get infrastructure for flow run &#39;</span><span class="si">{</span><span class="n">flow_run</span><span class="o">.</span><span class="n">id</span><span class="si">}</span><span class="s2">&#39;. &quot;</span>
Expand Down Expand Up @@ -8627,14 +8655,7 @@ <h3 id="prefect.agent.PrefectAgent.submit_run" class="doc doc-heading">

<details class="quote">
<summary>Source code in <code>prefect/agent.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">456</span>
<span class="normal">457</span>
<span class="normal">458</span>
<span class="normal">459</span>
<span class="normal">460</span>
<span class="normal">461</span>
<span class="normal">462</span>
<span class="normal">463</span>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">463</span>
<span class="normal">464</span>
<span class="normal">465</span>
<span class="normal">466</span>
Expand Down Expand Up @@ -8670,7 +8691,14 @@ <h3 id="prefect.agent.PrefectAgent.submit_run" class="doc doc-heading">
<span class="normal">496</span>
<span class="normal">497</span>
<span class="normal">498</span>
<span class="normal">499</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">submit_run</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">flow_run</span><span class="p">:</span> <span class="n">FlowRun</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="normal">499</span>
<span class="normal">500</span>
<span class="normal">501</span>
<span class="normal">502</span>
<span class="normal">503</span>
<span class="normal">504</span>
<span class="normal">505</span>
<span class="normal">506</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">submit_run</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">flow_run</span><span class="p">:</span> <span class="n">FlowRun</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"> Submit a flow run to the infrastructure</span>
<span class="sd"> &quot;&quot;&quot;</span>
Expand Down
Loading

0 comments on commit 6ad747d

Please sign in to comment.