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

feat: allow cleaning of cancelled and aborted jobs #1146

Merged

Conversation

katlyn
Copy link
Contributor

@katlyn katlyn commented Aug 7, 2024

Adds additional parameters to the builtin remove_old_jobs task to allow removing cancelled and aborted jobs in addition to failed and succeeded. Closes #1145.

Successful PR Checklist:

  • Tests
    • (not applicable?)
  • Documentation
    • (not applicable?)

PR label(s):

@katlyn katlyn requested a review from a team as a code owner August 7, 2024 18:07
@github-actions github-actions bot added the PR type: feature ⭐️ Contains new features label Aug 7, 2024
Copy link

github-actions bot commented Aug 7, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  procrastinate
  manager.py
Project Total  

This report was generated by python-coverage-comment-action

@medihack
Copy link
Member

medihack commented Aug 7, 2024

Great, thanks a lot for the contribution! LGTM.

@ewjoachim Do you have something to add? Otherwise, I will merge it into the main branch and make a minor release. Also, how about renaming remove_error resp. include_error to remove_failed resp. include_failed for the v3 release? Would look a bit more consistent to me.

Copy link
Member

@ewjoachim ewjoachim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulation for you first PR in Procrastinate, it seems perfectly good.

@ewjoachim
Copy link
Member

Also, how about renaming remove_error resp. include_error to remove_failed resp. include_failed for the v3 release? Would look a bit more consistent to me.

Yup.

Also, we need to be more consistent in the docstrings regarding the argument types. I believe they're not needed and sphinx can read them from type annotations, but we should make sure of that and fix it everywhere.

@ewjoachim ewjoachim merged commit 821db68 into procrastinate-org:main Aug 8, 2024
12 checks passed
@katlyn katlyn deleted the feat/clean-cancelled-aborted-jobs branch August 8, 2024 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR type: feature ⭐️ Contains new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include cancelled aborted tasks in remove_old_jobs
3 participants