procrastinate-org / procrastinate

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

Async InMemoryConnector (testing) #1159

Closed onlyann closed 3 weeks ago

onlyann commented 4 weeks ago

Successful PR Checklist:

PR label(s):

Context

Today, the only supported type of channel notification is the insertion of a new job.

To support more types of notification (e.g. cancellation), the connector will need to interact with async subscribers. To support awaiting async callbacks, some functions from the InMemoryConnector need to be async themselves.

This is what the change is about. Some tests have been updated to avoid mixing sync and async operations because of nested async_to_sync calls.

github-actions[bot] commented 4 weeks ago

Coverage report

Click to see where and how coverage changed

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

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