Closed katlyn closed 1 month ago
Yes, that sounds reasonable. We could have an include_aborted
and include_cancelled
. Also, the docstring seems to be wrong of delete_old_jobs.include_error
(it's the other way around). Would you be interested in providing a PR? ☺️
Currently, the builtin
remove_old_jobs
task only removes jobs that are succeeded or (optionally) failed. This can lead to cancelled and aborted tasks piling up in the database.https://github.com/procrastinate-org/procrastinate/blob/77bf6452856ce735572ec383718a2782cee9a8f0/procrastinate/manager.py#L198-L203
Ideally, there would be an additional parameter available to remove those types of jobs as well.