0

I'm using flower API Reference to build my own monitoring tool.

When calling to: GET /api/tasks - how are tasks sorted? If I make a request each minute, will I get the most newest tasks received? started? finished? Is there an option to choose sort method?

Chillar Anand
  • 27,936
  • 9
  • 119
  • 136
ItayB
  • 10,377
  • 9
  • 50
  • 77

1 Answers1

1

Flower relies on celery events. Looks like all the tasks are sorted by their event timestamps.

Unfortunately, there is no option to sort tasks as of now. However, it is very easy to modify the existing api to support sort.

Chillar Anand
  • 27,936
  • 9
  • 119
  • 136
  • Thanks for the refs. Just to clarify, I just understand the purpose of 'timestamp' field (because there are a lot of other time fields: received/success/started///) - it a dynamic field that updated with each event of the task – ItayB Feb 19 '17 at 13:57
  • @chillar Anand how did you modify it without touching the extension since modification will lost when you reinstall it – ira Jun 11 '23 at 11:32