-
Notifications
You must be signed in to change notification settings - Fork 27
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
Queue retention #16
Comments
Removing expired entries from a table is a classic case of something that requires a background worker. Possibly you could look into seeing if there is some sort of background worker system available for Django to carry out this task? |
I think an easy solution is to create a management command that removes completed tasks older than a certain interval, sort of like Django's clearsessions command. ./manage.py clear_db_tasks --age=30d Without an |
My current draft implementation does exactly that: #60. There is however a part of me which wants to add it to the existing worker process. That way, it becomes easier to run other maintenance tasks in that process too. Otherwise clearing, retries, and other maintenance might be other commands. It'd also keep configuration simpler, as it could live in |
I guess the goal is to make things easier for new users and not have them run multiple commands? I think it would be more clear if A couple of concerns:
|
This is a good point. I guess at the point that that's a requirement, it probably makes sense to just keep it an external command. When there's cron (#8 ), perhaps we can add the ability to automatically run it as part of that, but otherwise best keep it simpler for now! |
The task queue doesn't have the ability to remove old entries. This means the table can grow considerably, impacting performance.
"NEW" and "PROCESSING" tasks should never be removed! I suspect retention for complete and failed tasks should be configurable separately (even if failed inherits completed by default).
The text was updated successfully, but these errors were encountered: