Skip to content

Commit

Permalink
Set DeprecationWarning for AMI deprecation time
Browse files Browse the repository at this point in the history
Raise UserWarning if brute forced to stopp the server
Update image factory
Remove excessive thread logs
Release the most stable version
  • Loading branch information
dormant-user committed Sep 23, 2023
1 parent 2617989 commit 399725a
Show file tree
Hide file tree
Showing 12 changed files with 79 additions and 24 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ If connections take longer to establish due to network conditions, a short timeo

**Connection Rate**

If your server expects a high rate of incoming connections and you want to process them quickly, a shorter timeout can be beneficial.
However, it also means that your server needs to handle and process connections rapidly.
If your server expects a high rate of incoming connections, and you want to process them quickly, a shorter timeout can be beneficial.
However, it also means that your server needs to be able to process connections rapidly.

**Resource Usage**

Short timeouts can lead to a higher rate of repeated checks, which may consume more CPU resources on the server.
Ensure that your server has the capacity to handle frequent connection checks.
Ensure that your server has the capacity to handle frequent connection checks, if you are setting `CHANNEL_TIMEOUT` too low.
</details>

<details>
Expand Down
6 changes: 3 additions & 3 deletions docs/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ <h3>Environment Variables:<a class="headerlink" href="#environment-variables" ti
<p>Shorter timeouts can make your server more responsive to incoming connections but may also lead to false negatives if network latency is high.
If connections take longer to establish due to network conditions, a short timeout might reject valid connections prematurely.</p>
<p><strong>Connection Rate</strong></p>
<p>If your server expects a high rate of incoming connections and you want to process them quickly, a shorter timeout can be beneficial.
However, it also means that your server needs to handle and process connections rapidly.</p>
<p>If your server expects a high rate of incoming connections, and you want to process them quickly, a shorter timeout can be beneficial.
However, it also means that your server needs to be able to process connections rapidly.</p>
<p><strong>Resource Usage</strong></p>
<p>Short timeouts can lead to a higher rate of repeated checks, which may consume more CPU resources on the server.
Ensure that your server has the capacity to handle frequent connection checks.</p>
Ensure that your server has the capacity to handle frequent connection checks, if you are setting <code class="docutils literal notranslate"><span class="pre">CHANNEL_TIMEOUT</span></code> too low.</p>
</details><details>
<summary><strong>Custom endpoint</strong></summary><p>The public DNS names for EC2 instances are long and messy. To avoid that, an <code class="docutils literal notranslate"><span class="pre">A</span></code> record can be added to the <code class="docutils literal notranslate"><span class="pre">route53</span></code> hosted zone.</p>
<p>:warning:   Requires an active hosted zone on <code class="docutils literal notranslate"><span class="pre">route53</span></code>.</p>
Expand Down
6 changes: 3 additions & 3 deletions docs/_sources/README.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ If connections take longer to establish due to network conditions, a short timeo

**Connection Rate**

If your server expects a high rate of incoming connections and you want to process them quickly, a shorter timeout can be beneficial.
However, it also means that your server needs to handle and process connections rapidly.
If your server expects a high rate of incoming connections, and you want to process them quickly, a shorter timeout can be beneficial.
However, it also means that your server needs to be able to process connections rapidly.

**Resource Usage**

Short timeouts can lead to a higher rate of repeated checks, which may consume more CPU resources on the server.
Ensure that your server has the capacity to handle frequent connection checks.
Ensure that your server has the capacity to handle frequent connection checks, if you are setting `CHANNEL_TIMEOUT` too low.
</details>

<details>
Expand Down
4 changes: 4 additions & 0 deletions docs/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ <h2 id="A">A</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#expose.models.config.AMIBase.ALIAS">ALIAS (expose.models.config.AMIBase attribute)</a>
</li>
<li><a href="index.html#expose.models.config.Settings.ami_deprecation">ami_deprecation (expose.models.config.Settings attribute)</a>
</li>
<li><a href="index.html#expose.models.config.AMIBase">AMIBase (class in expose.models.config)</a>
</li>
Expand Down Expand Up @@ -139,6 +141,8 @@ <h2 id="D">D</h2>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#expose.models.image_factory.deprecation_warning">deprecation_warning() (in module expose.models.image_factory)</a>
</li>
<li><a href="index.html#expose.main.Tunnel.disassociate_security_group">disassociate_security_group() (expose.main.Tunnel method)</a>
</li>
<li><a href="index.html#expose.models.exceptions.DuplicateResource">DuplicateResource</a>
Expand Down
11 changes: 11 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,11 @@ <h1>Expose - Configuration<a class="headerlink" href="#expose-configuration" tit
<span class="sig-name descname"><span class="pre">configuration</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">Path</span></em><a class="headerlink" href="#expose.models.config.Settings.configuration" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="expose.models.config.Settings.ami_deprecation">
<span class="sig-name descname"><span class="pre">ami_deprecation</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">int</span></em><a class="headerlink" href="#expose.models.config.Settings.ami_deprecation" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="expose.models.config.Settings.entrypoint">
<span class="sig-name descname"><span class="pre">entrypoint</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><a class="headerlink" href="#expose.models.config.Settings.entrypoint" title="Permalink to this definition"></a></dt>
Expand Down Expand Up @@ -741,6 +746,12 @@ <h1>Expose - Configuration<a class="headerlink" href="#expose-configuration" tit
</section>
<section id="module-expose.models.image_factory">
<span id="expose-imagefactory"></span><h1>Expose - ImageFactory<a class="headerlink" href="#module-expose.models.image_factory" title="Permalink to this heading"></a></h1>
<dl class="py function">
<dt class="sig sig-object py" id="expose.models.image_factory.deprecation_warning">
<span class="sig-prename descclassname"><span class="pre">expose.models.image_factory.</span></span><span class="sig-name descname"><span class="pre">deprecation_warning</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">image_id</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">deprecation_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="headerlink" href="#expose.models.image_factory.deprecation_warning" title="Permalink to this definition"></a></dt>
<dd><p>Raises a deprecation warning if the chosen AMI is nearing (value is set in config) its DeprecationTime.</p>
</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="expose.models.image_factory.ImageFactory">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">expose.models.image_factory.</span></span><span class="sig-name descname"><span class="pre">ImageFactory</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">session</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Session</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">logger</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Logger</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#expose.models.image_factory.ImageFactory" title="Permalink to this definition"></a></dt>
Expand Down
Binary file modified docs/objects.inv
Binary file not shown.
Loading

0 comments on commit 399725a

Please sign in to comment.