procrastinate-org / procrastinate

PostgreSQL-based Task Queue for Python
https://procrastinate.readthedocs.io/
MIT License
852 stars 52 forks source link

Allow to cancel a job or request an abort #1081

Closed medihack closed 3 months ago

medihack commented 3 months ago

Closes #511

Successful PR Checklist:

PR label(s):

The only thing it breaks is when using the shell that cancel will leave the job in cancelled status (before the change it was left with failed). But I see it more as a fix than a breaking change.

The design decisions should be clear from the documentation page.

There are maybe parts to improve (maybe the acceptance tests?). Providing and testing sync and async APIs is quite hard, and sometimes also quite ugly 🙄. And in the end, it was more additional code than I thought.

github-actions[bot] commented 3 months ago

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  procrastinate
  exceptions.py
  job_context.py
  jobs.py
  manager.py
  shell.py
  testing.py
  worker.py
Project Total  

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

ewjoachim commented 3 months ago

Congratulations :)

medihack commented 3 months ago

Congratulations :)

Thank you for the super nice review process and the welcoming manner. I'll integrate Procrastinate in our applications in the upcoming days, but I will soon be back to take care of #1083. I also open another issue to track and discuss a possible listen-notify abort feature on top of this one.