flower icon indicating copy to clipboard operation
flower copied to clipboard

Flower doesn't show some active tasks when --persistent flag and --max-tasks are set

Open ocervell opened this issue 7 years ago • 1 comments

I run flower like:

$ flower -A celeryapp:app --persistent=True --max-tasks=1000000

Flower info

$ flower --version
flower   -> flower:0.9.2 tornado:4.5.2 babel:2.5.1
software -> celery:4.1.0 (latentcall) kombu:4.1.0 py:2.7.5
            billiard:3.5.0.3 py-amqp:2.2.2
platform -> system:Linux arch:64bit, ELF imp:CPython
loader   -> celery.loaders.app.AppLoader
settings -> transport:amqp results:disabled

Steps to reproduce

  • Create master task called 'master' and a few children tasks: 'child_a', 'child_b', 'child_c'
  • Call 'child_a', 'child_b', and 'child_c' from master task with 'apply_async' or 'delay'.
def master():
   r1 = child_a.delay()
   r2 = child_b.apply_async()
   r3 = child_c.apply_async()

def child_a():
   return 'child_a ran'

def child_b():
   return 'child_b ran'

def child_c():
   return 'child_c ran'

Issue With the first max-tasks tasks, the master task and the children tasks will show as active when the master task is ran. When the number of tasks is above max-tasks, only the master task will show as active in flower dashboard. The children tasks are not shown in the dashboard (but I see them running OK in my logs). I have tried:

  • Removing --persistent flag, it works fine (but I lose all the task data on flower restart).
  • Removing --max-tasks flag, flower will start hanging after a while (too many objects in the on-file database).

ocervell avatar Nov 08 '17 16:11 ocervell

try running as this and pass db name mydb

celery -A tasks flower --persistent=True --db=mydb

deveshbajaj59 avatar Oct 09 '19 05:10 deveshbajaj59