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 suggestion: save_limit per task group. #491

Open
jonaswinkler opened this issue Nov 28, 2020 · 0 comments · May be fixed by #687
Open

Feature suggestion: save_limit per task group. #491

jonaswinkler opened this issue Nov 28, 2020 · 0 comments · May be fixed by #687

Comments

@jonaswinkler
Copy link

Django Q keeps up to 250 successful task results in total by default.

Assert the following situation: Two tasks are scheduled to run, task 1 runs every 10 minutes, task 2 runs every week. The results of task 2 get removed from the database before it is run again, due to task 1 producing many results. With this, the task appears in the admin as if the result of the last execution is unknown.

Solution 1 would be to increase save_limit to 15000 or something so that this never happens.

The far better approach would be to have save_limit work for each group of tasks independently, so that django q keeps up to 250 results for the group task 1, and up to 250 results for the group task 2.

Maybe we can implement this as a new configuration option save_limit_per_group, which works alongside the already existing save_limit. This way, existing setups won't be affected at all.

If this is a desirable feature, I'd look into the implementation myself.

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 a pull request may close this issue.

1 participant