<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 verified that the issue exists against the <code class="notranslate">main</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> This has already been asked to the <a href="https://github.com/celery/celery/discussions">discussions forum</a> first.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br>
<a href="https://docs.celeryq.dev/en/main/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</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/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-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%22PR+Type%3A+Bugfix%22+-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/main">commit log</a><br>
to find out if the bug was already fixed in the main 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<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</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>
<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">main</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h2 dir="auto">Optional Debugging Information</h2>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br>
and/or implementation.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br>
result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br>
broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br>
ETA/Countdown &amp; rate limits disabled.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue after downgrading<br>
and/or upgrading Celery and its dependencies.</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>

<h4 dir="auto">Related Issues</h4>
<p dir="auto">it was first reported in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3826927" data-permission-text="Title is private" data-url="https://github.com/celery/celery/discussions/7255" data-hovercard-type="discussion" data-hovercard-url="/celery/celery/discussions/7255/hovercard" href="https://github.com/celery/celery/discussions/7255">#7255</a></p>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h2 dir="auto">Environment &amp; Settings</h2>

<p dir="auto"><strong>Celery version</strong>: 5.2.7</p>

<p dir="auto">software -&gt; celery:5.2.7 (dawn-chorus) kombu:5.2.4 py:3.10.10<br>
billiard:3.6.4.0 py-amqp:5.1.1<br>
platform -&gt; system:Linux arch:64bit<br>
kernel version:4.19.24-7.34.cbp.al7.x86_64 imp:CPython<br>
loader   -&gt; celery.loaders.default.Loader<br>
settings -&gt; transport:amqp results:disabled</p>
<p dir="auto">deprecated_settings: None</p>
<details>
<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -&gt; celery:5.2.7 (dawn-chorus) kombu:5.2.4 py:3.10.10
            billiard:3.6.4.0 redis:3.5.3
platform -&gt; system:Linux arch:64bit
            kernel version:4.19.24-7.34.cbp.al7.x86_64 imp:CPython
loader   -&gt; celery.loaders.app.AppLoader
settings -&gt; transport:redis results:disabled

deprecated_settings: None
CELERY_BROKER_URL: 'redis://:********@dongtai-redis:6379/0'
CELERY_RESULT_EXPIRES: 600
CELERY_WORKER_TASK_LOG_FORMAT: '%(message)s'
CELERY_WORKER_LOG_FORMAT: '%(message)s'
CELERY_TASK_EAGER_PROPAGATES: True
CELERY_WORKER_REDIRECT_STDOUTS: True
CELERY_WORKER_REDIRECT_STDOUTS_LEVEL: 'ERROR'
CELERY_WORKER_MAX_TASKS_PER_CHILD: 5000
CELERY_TASK_SOFT_TIME_LIMIT: 3600
CELERY_TASK_REJECT_ON_WORKER_LOST: True
task_queues: [&lt;unbound Queue dongtai-method-pool-scan -&gt; &lt;unbound Exchange dongtai-method-pool-scan(direct)&gt; -&gt; dongtai-method-pool-scan&gt;,
 &lt;unbound Queue dongtai-replay-vul-scan -&gt; &lt;unbound Exchange dongtai-replay-vul-scan(direct)&gt; -&gt; dongtai-replay-vul-scan&gt;,
 &lt;unbound Queue dongtai-sca-task -&gt; &lt;unbound Exchange dongtai-sca-task(direct)&gt; -&gt; dongtai-sca-task&gt;,
 &lt;unbound Queue dongtai-function-flush-data -&gt; &lt;unbound Exchange dongtai-function-flush-data(direct)&gt; -&gt; dongtai-function-flush-data&gt;,
 &lt;unbound Queue dongtai-es-save-task -&gt; &lt;unbound Exchange dongtai-es-save-task(direct)&gt; -&gt; dongtai-es-save-task&gt;,
 &lt;unbound Queue dongtai-method-pool-try-to-bind-method-pool -&gt; &lt;unbound Exchange dongtai-method-pool-try-to-bind-method-pool(direct)&gt; -&gt; dongtai-method-pool-try-to-bind-method-pool&gt;,
 &lt;unbound Queue dongtai-method-pool-judge_propagator -&gt; &lt;unbound Exchange dongtai-method-pool-judge_propagator(direct)&gt; -&gt; dongtai-method-pool-judge_propagator&gt;,
 &lt;unbound Queue judge-and-append-stack-generic -&gt; &lt;unbound Exchange judge-and-append-stack-generic(direct)&gt; -&gt; judge-and-append-stack-generic&gt;,
 &lt;unbound Queue dongtai-method-pool-update-chains -&gt; &lt;unbound Exchange dongtai-method-pool-update-chains(direct)&gt; -&gt; dongtai-method-pool-update-chains&gt;,
 &lt;unbound Queue dongtai-export-report-task -&gt; &lt;unbound Exchange dongtai-export-report-task(direct)&gt; -&gt; dongtai-export-report-task&gt;,
 &lt;unbound Queue dongtai-vul-notify-task -&gt; &lt;unbound Exchange dongtai-vul-notify-task(direct)&gt; -&gt; dongtai-vul-notify-task&gt;,
 &lt;unbound Queue dongtai-vul-webhook-task -&gt; &lt;unbound Exchange dongtai-vul-webhook-task(direct)&gt; -&gt; dongtai-vul-webhook-task&gt;,
 &lt;unbound Queue dongtai-asset-vul-notify-task -&gt; &lt;unbound Exchange dongtai-asset-vul-notify-task(direct)&gt; -&gt; dongtai-asset-vul-notify-task&gt;,
 &lt;unbound Queue dongtai-method-pool-recheck -&gt; &lt;unbound Exchange dongtai-method-pool-recheck(direct)&gt; -&gt; dongtai-method-pool-recheck&gt;,
 &lt;unbound Queue dongtai-periodic-task -&gt; &lt;unbound Exchange dongtai-periodic-task(direct)&gt; -&gt; dongtai-periodic-task&gt;]
task_serializer: 'json'
result_serializer: 'json'
accept_content: ['json']
task_ignore_result: True
task_acks_late: True
task_acks_on_failure_or_timeout: True
broker_connection_retry_on_startup: False
broker_connection_max_retries: 0
broker_pool_limit: 1000
task_routes: {
    'dongtai_common.utils.es.handle_batch_save': {   'exchange': 'dongtai-es-save-task',
                                                     'routing_key': '********'},
    'dongtai_common.utils.es.handle_save': {   'exchange': 'dongtai-es-save-task',
                                               'routing_key': '********'},
    'dongtai_conf.plugin.plug_request_chains.try_to_bind_method_pool': {   'exchange': 'dongtai-method-pool-try-to-bind-method-pool',
                                                                           'routing_key': '********'},
    'dongtai_conf.plugin.plug_request_chains.update_chains': {   'exchange': 'dongtai-method-pool-update-chains',
                                                                 'routing_key': '********'},
    'dongtai_engine.chain_propagator_tasks.judge_propagator': {   'exchange': 'dongtai-method-pool-judge_propagator',
                                                                  'routing_key': '********'},
    'dongtai_engine.chain_tasks.judge_and_append_stack_generic': {   'exchange': 'judge-and-append-stack-generic',
                                                                     'routing_key': '********'},
    'dongtai_engine.elatic_search.data_correction': {   'exchange': 'dongtai-es-save-task',
                                                        'routing_key': '********'},
    'dongtai_engine.plugins.data_clean': {   'exchange': 'dongtai-periodic-task',
                                             'routing_key': '********'},
    'dongtai_engine.preheat.function_flush': {   'exchange': 'dongtai-function-flush-data',
                                                 'routing_key': '********'},
    'dongtai_engine.preheat.function_preheat': {   'exchange': 'dongtai-periodic-task',
                                                   'routing_key': '********'},
    'dongtai_engine.signals.handlers.notify_controler.consume_notify_list': {   'exchange': 'dongtai-periodic-task',
                                                                                'routing_key': '********'},
    'dongtai_engine.signals.handlers.notify_controler.send_asset_vul_notify': {   'exchange': 'dongtai-asset-vul-notify-task',
                                                                                  'routing_key': '********'},
    'dongtai_engine.signals.handlers.notify_controler.send_vul_notify': {   'exchange': 'dongtai-vul-notify-task',
                                                                            'routing_key': '********'},
    'dongtai_engine.signals.handlers.notify_controler.web_hook_app_task': {   'exchange': 'dongtai-vul-webhook-task',
                                                                              'routing_key': '********'},
    'dongtai_engine.tasks.clear_error_log': {   'exchange': 'dongtai-periodic-task',
                                                'routing_key': '********'},
    'dongtai_engine.tasks.export_report': {   'exchange': 'dongtai-export-report-task',
                                              'routing_key': '********'},
    'dongtai_engine.tasks.heartbeat': {   'exchange': 'dongtai-periodic-task',
                                          'routing_key': '********'},
    'dongtai_engine.tasks.search_vul_from_method_pool': {   'exchange': 'dongtai-method-pool-scan',
                                                            'routing_key': '********'},
    'dongtai_engine.tasks.search_vul_from_replay_method_pool': {   'exchange': 'dongtai-replay-vul-scan',
                                                                   'routing_key': '********'},
    'dongtai_engine.tasks.update_agent_status': {   'exchange': 'dongtai-periodic-task',
                                                    'routing_key': '********'},
    'dongtai_engine.tasks.vul_recheck': {   'exchange': 'dongtai-periodic-task',
                                            'routing_key': '********'},
    'dongtai_web.dongtai_sca.scan.utils.update_one_sca': {   'exchange': 'dongtai-sca-task',
                                                             'routing_key': '********'},
    'dongtai_web.views.new_recheck.recheck': {   'exchange': 'dongtai-method-pool-recheck',
                                                 'routing_key': '********'}}
CELERY_ENABLE_UTC: False
timezone: 'Asia/Shanghai'
DJANGO_CELERY_BEAT_TZ_AWARE: False
CELERY_BEAT_SCHEDULER: 'django_celery_beat.schedulers:DatabaseScheduler'
"><pre class="notranslate"><code class="notranslate">software -&gt; celery:5.2.7 (dawn-chorus) kombu:5.2.4 py:3.10.10
            billiard:3.6.4.0 redis:3.5.3
platform -&gt; system:Linux arch:64bit
            kernel version:4.19.24-7.34.cbp.al7.x86_64 imp:CPython
loader   -&gt; celery.loaders.app.AppLoader
settings -&gt; transport:redis results:disabled

deprecated_settings: None
CELERY_BROKER_URL: 'redis://:********@dongtai-redis:6379/0'
CELERY_RESULT_EXPIRES: 600
CELERY_WORKER_TASK_LOG_FORMAT: '%(message)s'
CELERY_WORKER_LOG_FORMAT: '%(message)s'
CELERY_TASK_EAGER_PROPAGATES: True
CELERY_WORKER_REDIRECT_STDOUTS: True
CELERY_WORKER_REDIRECT_STDOUTS_LEVEL: 'ERROR'
CELERY_WORKER_MAX_TASKS_PER_CHILD: 5000
CELERY_TASK_SOFT_TIME_LIMIT: 3600
CELERY_TASK_REJECT_ON_WORKER_LOST: True
task_queues: [&lt;unbound Queue dongtai-method-pool-scan -&gt; &lt;unbound Exchange dongtai-method-pool-scan(direct)&gt; -&gt; dongtai-method-pool-scan&gt;,
 &lt;unbound Queue dongtai-replay-vul-scan -&gt; &lt;unbound Exchange dongtai-replay-vul-scan(direct)&gt; -&gt; dongtai-replay-vul-scan&gt;,
 &lt;unbound Queue dongtai-sca-task -&gt; &lt;unbound Exchange dongtai-sca-task(direct)&gt; -&gt; dongtai-sca-task&gt;,
 &lt;unbound Queue dongtai-function-flush-data -&gt; &lt;unbound Exchange dongtai-function-flush-data(direct)&gt; -&gt; dongtai-function-flush-data&gt;,
 &lt;unbound Queue dongtai-es-save-task -&gt; &lt;unbound Exchange dongtai-es-save-task(direct)&gt; -&gt; dongtai-es-save-task&gt;,
 &lt;unbound Queue dongtai-method-pool-try-to-bind-method-pool -&gt; &lt;unbound Exchange dongtai-method-pool-try-to-bind-method-pool(direct)&gt; -&gt; dongtai-method-pool-try-to-bind-method-pool&gt;,
 &lt;unbound Queue dongtai-method-pool-judge_propagator -&gt; &lt;unbound Exchange dongtai-method-pool-judge_propagator(direct)&gt; -&gt; dongtai-method-pool-judge_propagator&gt;,
 &lt;unbound Queue judge-and-append-stack-generic -&gt; &lt;unbound Exchange judge-and-append-stack-generic(direct)&gt; -&gt; judge-and-append-stack-generic&gt;,
 &lt;unbound Queue dongtai-method-pool-update-chains -&gt; &lt;unbound Exchange dongtai-method-pool-update-chains(direct)&gt; -&gt; dongtai-method-pool-update-chains&gt;,
 &lt;unbound Queue dongtai-export-report-task -&gt; &lt;unbound Exchange dongtai-export-report-task(direct)&gt; -&gt; dongtai-export-report-task&gt;,
 &lt;unbound Queue dongtai-vul-notify-task -&gt; &lt;unbound Exchange dongtai-vul-notify-task(direct)&gt; -&gt; dongtai-vul-notify-task&gt;,
 &lt;unbound Queue dongtai-vul-webhook-task -&gt; &lt;unbound Exchange dongtai-vul-webhook-task(direct)&gt; -&gt; dongtai-vul-webhook-task&gt;,
 &lt;unbound Queue dongtai-asset-vul-notify-task -&gt; &lt;unbound Exchange dongtai-asset-vul-notify-task(direct)&gt; -&gt; dongtai-asset-vul-notify-task&gt;,
 &lt;unbound Queue dongtai-method-pool-recheck -&gt; &lt;unbound Exchange dongtai-method-pool-recheck(direct)&gt; -&gt; dongtai-method-pool-recheck&gt;,
 &lt;unbound Queue dongtai-periodic-task -&gt; &lt;unbound Exchange dongtai-periodic-task(direct)&gt; -&gt; dongtai-periodic-task&gt;]
task_serializer: 'json'
result_serializer: 'json'
accept_content: ['json']
task_ignore_result: True
task_acks_late: True
task_acks_on_failure_or_timeout: True
broker_connection_retry_on_startup: False
broker_connection_max_retries: 0
broker_pool_limit: 1000
task_routes: {
    'dongtai_common.utils.es.handle_batch_save': {   'exchange': 'dongtai-es-save-task',
                                                     'routing_key': '********'},
    'dongtai_common.utils.es.handle_save': {   'exchange': 'dongtai-es-save-task',
                                               'routing_key': '********'},
    'dongtai_conf.plugin.plug_request_chains.try_to_bind_method_pool': {   'exchange': 'dongtai-method-pool-try-to-bind-method-pool',
                                                                           'routing_key': '********'},
    'dongtai_conf.plugin.plug_request_chains.update_chains': {   'exchange': 'dongtai-method-pool-update-chains',
                                                                 'routing_key': '********'},
    'dongtai_engine.chain_propagator_tasks.judge_propagator': {   'exchange': 'dongtai-method-pool-judge_propagator',
                                                                  'routing_key': '********'},
    'dongtai_engine.chain_tasks.judge_and_append_stack_generic': {   'exchange': 'judge-and-append-stack-generic',
                                                                     'routing_key': '********'},
    'dongtai_engine.elatic_search.data_correction': {   'exchange': 'dongtai-es-save-task',
                                                        'routing_key': '********'},
    'dongtai_engine.plugins.data_clean': {   'exchange': 'dongtai-periodic-task',
                                             'routing_key': '********'},
    'dongtai_engine.preheat.function_flush': {   'exchange': 'dongtai-function-flush-data',
                                                 'routing_key': '********'},
    'dongtai_engine.preheat.function_preheat': {   'exchange': 'dongtai-periodic-task',
                                                   'routing_key': '********'},
    'dongtai_engine.signals.handlers.notify_controler.consume_notify_list': {   'exchange': 'dongtai-periodic-task',
                                                                                'routing_key': '********'},
    'dongtai_engine.signals.handlers.notify_controler.send_asset_vul_notify': {   'exchange': 'dongtai-asset-vul-notify-task',
                                                                                  'routing_key': '********'},
    'dongtai_engine.signals.handlers.notify_controler.send_vul_notify': {   'exchange': 'dongtai-vul-notify-task',
                                                                            'routing_key': '********'},
    'dongtai_engine.signals.handlers.notify_controler.web_hook_app_task': {   'exchange': 'dongtai-vul-webhook-task',
                                                                              'routing_key': '********'},
    'dongtai_engine.tasks.clear_error_log': {   'exchange': 'dongtai-periodic-task',
                                                'routing_key': '********'},
    'dongtai_engine.tasks.export_report': {   'exchange': 'dongtai-export-report-task',
                                              'routing_key': '********'},
    'dongtai_engine.tasks.heartbeat': {   'exchange': 'dongtai-periodic-task',
                                          'routing_key': '********'},
    'dongtai_engine.tasks.search_vul_from_method_pool': {   'exchange': 'dongtai-method-pool-scan',
                                                            'routing_key': '********'},
    'dongtai_engine.tasks.search_vul_from_replay_method_pool': {   'exchange': 'dongtai-replay-vul-scan',
                                                                   'routing_key': '********'},
    'dongtai_engine.tasks.update_agent_status': {   'exchange': 'dongtai-periodic-task',
                                                    'routing_key': '********'},
    'dongtai_engine.tasks.vul_recheck': {   'exchange': 'dongtai-periodic-task',
                                            'routing_key': '********'},
    'dongtai_web.dongtai_sca.scan.utils.update_one_sca': {   'exchange': 'dongtai-sca-task',
                                                             'routing_key': '********'},
    'dongtai_web.views.new_recheck.recheck': {   'exchange': 'dongtai-method-pool-recheck',
                                                 'routing_key': '********'}}
CELERY_ENABLE_UTC: False
timezone: 'Asia/Shanghai'
DJANGO_CELERY_BEAT_TZ_AWARE: False
CELERY_BEAT_SCHEDULER: 'django_celery_beat.schedulers:DatabaseScheduler'

</code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<h2 dir="auto">Required Dependencies</h2>

<ul dir="auto">
<li><strong>Minimal Python Version</strong>: 3.10.10</li>
<li><strong>Minimal Celery Version</strong>: 5.2.7</li>
<li><strong>Minimal Kombu Version</strong>: 5.2.4</li>
<li><strong>Minimal Broker Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Version</strong>: N/A or Unknown</li>
<li><strong>Minimal OS and/or Kernel Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Client Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Client Version</strong>: N/A or Unknown</li>
</ul>
<h3 dir="auto">Python Packages</h3>

<details>
<summary><b><code class="notranslate">pip freeze</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="aliyun-python-sdk-core==2.13.36
aliyun-python-sdk-core-v3==2.13.33
aliyun-python-sdk-kms==2.16.0
amqp==5.1.1
asgiref==3.6.0
asyncio-gevent==0.2.1
attrs==22.2.0
billiard==3.6.4.0
boto3==1.24.59
boto3-stubs==1.26.90
botocore==1.27.91
botocore-stubs==1.29.90
celery==5.2.7
certifi==2022.12.7
cffi==1.15.1
chardet==4.0.0
click==8.1.3
click-didyoumean==0.3.0
click-plugins==1.1.1
click-repl==0.2.0
crcmod==1.7
cryptography==39.0.1
ddt==1.6.0
defusedxml==0.7.1
diff-match-patch==20200713
distlib==0.3.6
Django==3.2.18
django-celery-beat==2.2.0
django-cors-headers==3.14.0
django-cprofile-middleware==1.0.5
django-elasticsearch-dsl==7.2.2
django-filter==22.1
django-import-export==2.5.0
django-mock-queries==2.1.7
django-modeltranslation==0.17.7
django-ranged-response==0.2.0
django-redis==5.2.0
django-rest-framework-proxy==1.6.0
django-simple-captcha==0.5.17
django-stubs==1.15.0
django-stubs-ext==0.7.0
django-timezone-field==4.2.3
django-utils==0.0.2
django-utils-six==2.0
django-xff==1.3.0
djangorestframework==3.12.4
djangorestframework-stubs==1.9.1
docxcompose==1.3.4
docxtpl==0.16.0
drf-spectacular==0.22.1
elasticsearch==7.17.7
elasticsearch-dsl==7.4.1
et-xmlfile==1.1.0
filelock==3.10.0
gevent==21.12.0
greenlet==1.1.3.post0
id-validator==1.0.20
idna==2.10
inflection==0.5.1
Jinja2==3.1.2
jmespath==0.10.0
jq==1.3.0
jsonlog==4.0.0
jsonschema==4.17.0
kombu==5.2.4
lxml==4.9.1
MarkupPy==1.14
MarkupSafe==2.1.2
mock==5.0.1
model-bakery==1.10.1
mypy==1.0.1
mypy-extensions==1.0.0
mysqlclient==2.1.1
numpy==1.24.2
odfpy==1.4.1
openpyxl==3.0.9
oss2==2.13.1
packaging==21.3
pep8==1.7.1
Pillow==9.3.0
pipenv==2023.2.18
platformdirs==3.1.1
prompt-toolkit==3.0.38
pycparser==2.21
pycryptodome==3.17
pycryptodomex==3.14.1
PyMySQL==1.0.2
pyparsing==3.0.9
pyre2==0.3.6
pyrsistent==0.19.1
python-crontab==2.7.1
python-dateutil==2.8.2
python-docx==0.8.11
python-json-logger==2.0.7
pytz==2022.6
PyYAML==6.0
redis==3.5.3
requests==2.25.1
result==0.8.0
s3transfer==0.6.0
simhash==2.1.2
six==1.15.0
sqlparse==0.4.3
tablib==3.3.0
tomli==2.0.1
types-awscrt==0.16.12
types-PyMySQL==1.0.19.5
types-pyOpenSSL==23.0.0.4
types-pytz==2022.7.1.2
types-PyYAML==6.0.12.8
types-redis==4.5.1.5
types-requests==2.28.11.15
types-s3transfer==0.6.0.post5
types-urllib3==1.26.25.8
typing_extensions==4.5.0
uritemplate==4.1.1
urllib3==1.26.5
uWSGI==2.0.21
uwsgitop==0.11
vine==5.0.0
virtualenv==20.21.0
virtualenv-clone==0.5.7
wcwidth==0.2.6
xlrd==2.0.1
xlwt==1.3.0
zope.event==4.6
zope.interface==5.5.2"><pre class="notranslate"><code class="notranslate">aliyun-python-sdk-core==2.13.36
aliyun-python-sdk-core-v3==2.13.33
aliyun-python-sdk-kms==2.16.0
amqp==5.1.1
asgiref==3.6.0
asyncio-gevent==0.2.1
attrs==22.2.0
billiard==3.6.4.0
boto3==1.24.59
boto3-stubs==1.26.90
botocore==1.27.91
botocore-stubs==1.29.90
celery==5.2.7
certifi==2022.12.7
cffi==1.15.1
chardet==4.0.0
click==8.1.3
click-didyoumean==0.3.0
click-plugins==1.1.1
click-repl==0.2.0
crcmod==1.7
cryptography==39.0.1
ddt==1.6.0
defusedxml==0.7.1
diff-match-patch==20200713
distlib==0.3.6
Django==3.2.18
django-celery-beat==2.2.0
django-cors-headers==3.14.0
django-cprofile-middleware==1.0.5
django-elasticsearch-dsl==7.2.2
django-filter==22.1
django-import-export==2.5.0
django-mock-queries==2.1.7
django-modeltranslation==0.17.7
django-ranged-response==0.2.0
django-redis==5.2.0
django-rest-framework-proxy==1.6.0
django-simple-captcha==0.5.17
django-stubs==1.15.0
django-stubs-ext==0.7.0
django-timezone-field==4.2.3
django-utils==0.0.2
django-utils-six==2.0
django-xff==1.3.0
djangorestframework==3.12.4
djangorestframework-stubs==1.9.1
docxcompose==1.3.4
docxtpl==0.16.0
drf-spectacular==0.22.1
elasticsearch==7.17.7
elasticsearch-dsl==7.4.1
et-xmlfile==1.1.0
filelock==3.10.0
gevent==21.12.0
greenlet==1.1.3.post0
id-validator==1.0.20
idna==2.10
inflection==0.5.1
Jinja2==3.1.2
jmespath==0.10.0
jq==1.3.0
jsonlog==4.0.0
jsonschema==4.17.0
kombu==5.2.4
lxml==4.9.1
MarkupPy==1.14
MarkupSafe==2.1.2
mock==5.0.1
model-bakery==1.10.1
mypy==1.0.1
mypy-extensions==1.0.0
mysqlclient==2.1.1
numpy==1.24.2
odfpy==1.4.1
openpyxl==3.0.9
oss2==2.13.1
packaging==21.3
pep8==1.7.1
Pillow==9.3.0
pipenv==2023.2.18
platformdirs==3.1.1
prompt-toolkit==3.0.38
pycparser==2.21
pycryptodome==3.17
pycryptodomex==3.14.1
PyMySQL==1.0.2
pyparsing==3.0.9
pyre2==0.3.6
pyrsistent==0.19.1
python-crontab==2.7.1
python-dateutil==2.8.2
python-docx==0.8.11
python-json-logger==2.0.7
pytz==2022.6
PyYAML==6.0
redis==3.5.3
requests==2.25.1
result==0.8.0
s3transfer==0.6.0
simhash==2.1.2
six==1.15.0
sqlparse==0.4.3
tablib==3.3.0
tomli==2.0.1
types-awscrt==0.16.12
types-PyMySQL==1.0.19.5
types-pyOpenSSL==23.0.0.4
types-pytz==2022.7.1.2
types-PyYAML==6.0.12.8
types-redis==4.5.1.5
types-requests==2.28.11.15
types-s3transfer==0.6.0.post5
types-urllib3==1.26.25.8
typing_extensions==4.5.0
uritemplate==4.1.1
urllib3==1.26.5
uWSGI==2.0.21
uwsgitop==0.11
vine==5.0.0
virtualenv==20.21.0
virtualenv-clone==0.5.7
wcwidth==0.2.6
xlrd==2.0.1
xlwt==1.3.0
zope.event==4.6
zope.interface==5.5.2
</code></pre></div>
<p dir="auto"></p>
</details>
<h3 dir="auto">Other Dependencies</h3>

<details>
<p dir="auto">
N/A
</p>
</details>
<h2 dir="auto">Minimally Reproducible Test Case</h2>

<details>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="function.apply_async(expires=datetime.now() +timedelta(hours=3),)"><pre class="notranslate"><code class="notranslate">function.apply_async(expires=datetime.now() +timedelta(hours=3),)
</code></pre></div>
<p dir="auto">then use</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="self.retry(exc=e, countdown=delay)"><pre class="notranslate"><code class="notranslate">self.retry(exc=e, countdown=delay)
</code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>

<p dir="auto">Perform retries without error.</p>
<h1 dir="auto">Actual Behavior</h1>

<p dir="auto">2023-03-16T17:21:20.663973<br>
&lt;class 'str'&gt;<br>
2023-03-16T17:21:20.663973<br>
&lt;class 'str'&gt;<br>
Task dongtai_engine.tasks.search_vul_from_method_pool[8df36afe-850e-4698-ab3c-cd59900b3381] reject requeue=False: '&lt;' not supported between instances of 'str' and 'int'<br>
Traceback (most recent call last):<br>
File "/opt/dongtai/dongtai_engine/tasks.py", line 242, in search_vul_from_method_pool<br>
raise RetryableException(f'漏洞检测方法池 {method_pool_sign} 不存在，重试第 {tries} 次')<br>
dongtai_engine.tasks.RetryableException: 漏洞检测方法池 832a71cc504f47ad9c7ebccff2d838ea 不存在，重试第 1 次</p>
<p dir="auto">During handling of the above exception, another exception occurred:</p>
<p dir="auto">Traceback (most recent call last):<br>
File "/usr/local/lib/python3.10/site-packages/celery/app/task.py", line 734, in retry<br>
S.apply_async()<br>
File "/usr/local/lib/python3.10/site-packages/celery/canvas.py", line 219, in apply_async<br>
return _apply(args, kwargs, **options)<br>
File "/usr/local/lib/python3.10/site-packages/celery/app/task.py", line 575, in apply_async<br>
return app.send_task(<br>
File "/usr/local/lib/python3.10/site-packages/celery/app/base.py", line 744, in send_task<br>
if expires_s &lt; 0:<br>
TypeError: '&lt;' not supported between instances of 'str' and 'int'</p>
<p dir="auto">During handling of the above exception, another exception occurred:</p>
<p dir="auto">Traceback (most recent call last):<br>
File "/usr/local/lib/python3.10/site-packages/celery/app/trace.py", line 451, in trace_task<br>
R = retval = fun(*args, **kwargs)<br>
File "/usr/local/lib/python3.10/site-packages/celery/app/trace.py", line 734, in <strong>protected_call</strong><br>
return self.run(*args, **kwargs)<br>
File "/opt/dongtai/dongtai_engine/tasks.py", line 272, in search_vul_from_method_pool<br>
self.retry(exc=e, countdown=delay)<br>
File "/usr/local/lib/python3.10/site-packages/celery/app/task.py", line 736, in retry<br>
raise Reject(exc, requeue=False)<br>
celery.exceptions.Reject: (TypeError("'&lt;' not supported between instances of 'str' and 'int'"), False)</p>
<p dir="auto">I'm wondering if we can ditch the prefork pool and use subprocesses that communicate using pipes. Possibly even stdin/stdout.<br>
Would that resolve a lot of the limitations of preforking such as running threads inside the master celery process and running other subprocesses?<br>
What are the limitations of such design?</p>