Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Feature - Drop old tasks with max_count or timedelta #1310

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

denisolyanyuk
Copy link

@denisolyanyuk denisolyanyuk commented Aug 1, 2023

It would be useful to have the ability to drop tasks in flower: in my case there is a task that runs pretty frequent (for example 2 every mins) and it's important to see last 10 runs and would be better to drop all not important tasks.

This solution is similar to this PR #1188 but I think my approach is better.
You need to add one list in flowerconfig.py and that's all:

limit_tasks_by_type=[ {'type': 'test_task', "max_count": 10, "timedelta": timedelta(minutes=10)}, ]

It will keep 10 newest test_task and drop everything else and drop any test_task older that 10 minutes

@max-wittig
Copy link

@mher Could you take a look at this one? That seems to be a missing feature in Flower.

@premchalmeti
Copy link

This is required. @mher any plans on merging this?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants