Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to visualize online workers properly and remove offline workers from Flower?

Tags:

celery

flower

We are using Flower to visualize tasks and workers in Celery. The problem is that we use Amazon autoscaling to spawn new workers. Hence, old workers terminate one day and new workers are spawned the next day and they register themselves as new workers. The old ones still remain there as offline workers. This makes sense if we are interested to see the stats of each worker. Is there a way to hide them if we are not interested in their stats?

Also most of the times a new workers registers itself, Flower has an issue showing it, it shows

Unknown worker 'celery@ip-172-XX-XX-XX' 

How can we ensure that each worker can be visualized properly when online and avoid this error?

like image 943
web_ninja Avatar asked Jul 07 '15 07:07

web_ninja


1 Answers

I wanted the same too, and not so long ago created an issue on GitHub for it - https://github.com/mher/flower/issues/840. Soon after that Bjoern Stiel wrote an implementation, which is still waiting to be merged (https://github.com/mher/flower/pull/852). You can simply grab this branch and use it. :)

like image 102
DejanLekic Avatar answered Oct 21 '22 23:10

DejanLekic