mher / flower

Real-time monitor and web admin for Celery distributed task queue
https://flower.readthedocs.io
Other
6.48k stars 1.09k forks source link

max_tasks is not shrinking tasks when threshold is passed #1380

Open henkesde opened 5 months ago

henkesde commented 5 months ago

Describe the bug I start flower using the parameter --max_tasks, but the tasks are not being shrinked when the threshold is passed. Starting the server like this:

/usr/local/bin/celery --app celery_flower --broker="pyamqp://user:***@hostname:5671//" flower --broker_api="https://user:***@hostname:15671/api/" --persistent --state_save_interval=5000 --max_tasks=20 --db="/home/flower/data/flower.db"

This is my celery_flower.py:

from celery import Celery

app = Celery('celery_flower')
# SSL Configuration for Untrusted Certificates
app.conf.BROKER_USE_SSL = {
    'cert_reqs': ssl.CERT_NONE  # This will cause Celery to ignore verifying the certificate
}

# And some more custom code. But nothing on the Celery object

Due to other dependencies we can't solve right now, we're on flower v1.2.0 right now. Am I missing something here in order to make this --max_tasks working correctly? All other parameters like for example the --state_save_interval seem to work correctly.