1

I have the following celery task:

@pp.task(name="my dummy task")
def dummy_task(args, my_ids):
    print ("run background task")
    //long process here
    return {'status':'ok}

The thing is that the my_ids carries a lot of information and when I look at 'flower' app the args column is completely cluttered. Is there any annotation/decorator to use to avoid this?

enter image description here

ProcolHarum
  • 721
  • 3
  • 17

1 Answers1

0

I think you can configure format-task which is flower's configuration:

Modifies the default task formatting. format_task function should be defined in the flowerconfig.py configuration file. It accepts a task object and returns the modified version.

format_task is useful for filtering out sensitive information.

The example in the link shows you how to limit display lengths (or filter the my_ids out).

ItayB
  • 10,377
  • 9
  • 50
  • 77