Skip to content
New issue

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

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

Already on GitHub? Sign in 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

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

Successfully merging this pull request may close these issues.

None yet

1 participant