PGQueuer v0.17.0 introduces breaking changes, improvements, and bug fixes. Please review the changes below, especially if using custom executors.
Breaking Changes
Executors Overhaul
- `JobExecutor` is now `AbstractEntrypointExecutor`.
- The `execute()` method now requires an additional `context` parameter: `async def execute(self, job: models.Job, context: models.Context) -> None`.
- **Custom Executor Registration**: Use `executor_factory` instead of `executor` for registering executors.
- **EntrypointExecutor Parameters**: Consolidated into `EntrypointExecutorParameters` dataclass.
Scheduler Executor Changes
- Schedulers now use `executor_factory` instead of direct instantiation.
- Executor parameters are consolidated into `ScheduleExecutorFactoryParameters`.
Deprecations
- **Executor Parameter**: Deprecated in favor of `executor_factory`.
- **Retry Timer Argument**: Define retry behavior at the entrypoint level instead of using `QueueManager.run()`.
Improvements
- Executors now receive a `context` object for better control over job execution.
Migration Guide
Updating Executors and Schedulers
1. Update executors to inherit from `AbstractEntrypointExecutor`.
2. Modify `execute()` to accept `context` as a parameter.
3. Use `executor_factory` to register executors.
4. Update schedulers to use `executor_factory` and access attributes via `parameters` (e.g., `executor.parameters.expression`).
Merges
* Use uv in test dockerfile by janbjorge in https://github.com/janbjorge/pgqueuer/pull/205
* Revert: Use uv in test dockerfile by janbjorge in https://github.com/janbjorge/pgqueuer/pull/206
* Revert docker cache by janbjorge in https://github.com/janbjorge/pgqueuer/pull/207
* Use queue_status_type in query builder by janbjorge in https://github.com/janbjorge/pgqueuer/pull/211
* Add executor_factory to entrypoint and schedule by janbjorge in https://github.com/janbjorge/pgqueuer/pull/208
**Full Changelog**: https://github.com/janbjorge/pgqueuer/compare/v0.16.2...v0.17.0