<h2 dir="auto">Checklist</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -&gt; celery:4.2.1 (windowlicker) kombu:4.2.1 py:3.6.5
            billiard:3.5.0.4 py-amqp:2.3.2
platform -&gt; system:Linux arch:64bit, ELF imp:CPython
loader   -&gt; celery.loaders.app.AppLoader
settings -&gt; transport:amqp results:disabled"><pre class="notranslate"><code class="notranslate">software -&gt; celery:4.2.1 (windowlicker) kombu:4.2.1 py:3.6.5
            billiard:3.5.0.4 py-amqp:2.3.2
platform -&gt; system:Linux arch:64bit, ELF imp:CPython
loader   -&gt; celery.loaders.app.AppLoader
settings -&gt; transport:amqp results:disabled
</code></pre></div>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
</ul>
<h2 dir="auto">Steps to reproduce</h2>
<p dir="auto">Run a Celery worker with <code class="notranslate">--pool=solo</code> option and send it a SIGTERM while executing a task. By running <a href="https://gist.github.com/entwanne/819db854ea3e01f6e54968bab9ecc723">this script</a> for example.</p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">The task should complete before the process stops, like when running without <code class="notranslate">--pool=solo</code>.</p>
<h2 dir="auto">Actual behavior</h2>
<p dir="auto">The worker prints "worker: Warm shutdown (MainProcess)" and immediatly stops.</p>
<p dir="auto">Maybe related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="175209840" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/3430" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/3430/hovercard" href="https://github.com/celery/celery/issues/3430">#3430</a></p>
<h1 dir="auto">Checklist</h1>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?utf8=%E2%9C%93&amp;q=is%3Aissue+label%3A%22Category%3A+Documentation%22+">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues in this issue<br>
(If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>
<ul dir="auto">
<li>None</li>
</ul>
<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h1 dir="auto">Description</h1>
<p dir="auto">I had a deployed dev django application on AWS cloud with SQS setup via url format <code class="notranslate">sqs://aws_access_key_id:aws_secret_access_key@</code>. This was the first thing I saw to make it running with SQS.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/50069473/146331493-2b330b7a-8cc7-49ab-a0d9-3498491ec646.png"><img src="https://user-images.githubusercontent.com/50069473/146331493-2b330b7a-8cc7-49ab-a0d9-3498491ec646.png" alt="2021-12-12!UNITO-UNDERSCORE!14-22-11" style="max-width: 100%;"></a></p>
<p dir="auto">Since it was development server I had <code class="notranslate">DEBUG=True</code> for the django. Django itself in debug mode shows environment variables when it hits 500 error.<br>
The problem is that in this case sqs url setup becomes dangerous. It's exposed to the page while other type of environment variables like <code class="notranslate">token</code>, <code class="notranslate">password</code>, etc are hidden.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/50069473/146332737-144d880d-466b-4171-aa49-d0cae239d8c3.png"><img src="https://user-images.githubusercontent.com/50069473/146332737-144d880d-466b-4171-aa49-d0cae239d8c3.png" alt="2021-12-12!UNITO-UNDERSCORE!10-27-29" style="max-width: 100%;"></a></p>
<p dir="auto">I know this might sound like it's not related to celery, but since celery is mostly used with django in many projects I consider the SQS setup documentation  dangerous to newcomers and to the people who didn't notice that.</p>
<p dir="auto">Actually someone from the internet really got access to the key and we lost some money..</p>
<h1 dir="auto">Suggestions</h1>
<p dir="auto">Either add a warning that this is dangerous to use access and secret key with turned on debug mode on django or completely delete this sqs url format with access and secret keys.</p>