Repository navigation
Breaking changes
Inbox.cleanup_cutoff and Inbox.delete_expired_batch are removed. Use InboxCleaner instead, which runs a whole cleanup run itself:
cleaner = InboxCleaner(engine=engine, table=INBOX_TABLE, retention=datetime.timedelta(days=7))
result = await cleaner.cleanup() # CleanupResult(cutoff=..., deleted_count=...)InboxCleaner takes the AsyncEngine, not a session, and its arguments are keyword-only. It runs each batch in its own READ COMMITTED transaction and never disposes the engine. It doesn't retry: if a run fails, the next one deletes what is left. Drop your own cleanup use case and any postgres_retry around it. Inbox(session, table) and Inbox.claim are unchanged.
See the Cleaning up section of the README.
What's Changed
- test: run the README cleanup example against PostgreSQL by @lesnik512 in #3
- test: run the README processing example against PostgreSQL by @lesnik512 in #4
- feat!: add InboxCleaner and drop the Inbox cleanup methods by @lesnik512 in #5
Full Changelog: 0.1.0...0.2.0