Skip to content

Releases: janbjorge/pgqueuer

v0.16.1

16 Nov 17:58
412420a
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.16.0...v0.16.1

v0.16.0

15 Nov 09:46
0455e8b
Compare
Choose a tag to compare

PGQueuer v0.16.0 Release Notes

Release of v0.16.0, bringing new capability: deferred job execution for more precise control over job timing.

Breaking Changes / Migration Notes

  • Database Schema Update: The Job model now includes a new execute_after column. This change requires a database schema update. To apply the necessary migration, please run:
python -m pgqueuer upgrade

Failing to apply this migration will result in errors when trying to enqueue jobs with the new execute_after attribute.

What's Changed

Example Usage

To enqueue a job for deferred execution until 1 minute from now:

from datetime import timedelta
await Queries(apgdriver).enqueue("my_task", payload=None, priority=0, execute_after=timedelta(minutes=1))

This job will only be picked for execution once the specified minute has elapsed, giving you better control over job timing.

Full Changelog: v0.15.0...v0.16.0

v0.15.0

11 Nov 18:02
5b54585
Compare
Choose a tag to compare

PGQueuer v0.15.0 Release Notes

Im excited to introduce a new features and enhancements in this release; support for scheduling recurring jobs using cron-like syntax.

What's Changed

  • Public Interfaces Defined: Updated __init__.py to define public interfaces more clearly (#186).
  • Scheduling with Crontab Syntax: You can now schedule functions using cron-like expressions for periodic task execution (#188).
  • Added SchedulerManager to Public API: Included SchedulerManager in __init__.py for easy access (#191).
  • Added Scheduler Example to README: Enhanced documentation with examples on using the new scheduling feature (#190).
  • Batch RPS Events: Implemented batching to improve the handling of rate-per-second (RPS) events (#192).

Note: In order to use the new scheduling feature, a migration step is required. Please run:

python -m pgqueuer upgrade

Example Usage

To schedule a recurring task every minute:

@scheduler.schedule("sync_data", "* * * * *")
async def sync_data(schedule: Schedule) -> None:
    print("Running scheduled sync_data task")

Run the scheduler using the CLI:

pgq run myapp.create_scheduler

Full Changelog: v0.14.1...v0.15.0

v0.14.1

08 Nov 21:16
8712b5b
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.14.0...v0.14.1

v0.14.0

05 Nov 17:43
7ed2125
Compare
Choose a tag to compare

Breaking Change

This release introduces a new database schema. Before deploying this version, ensure your database schema is updated by running the following command:

python -m pgqueuer upgrade

This step is essential for compatibility with new features, including schema modifications related to job management.

What's Changed

  • PsycopgDriver Fix: Corrected missing inheritance for PsycopgDriver, enhancing type compatibility and functionality. #169
  • Renamed alive to shutdown: Updated the alive attribute to shutdown to better reflect its purpose across the codebase. Backwards compatibility maintained with a deprecation warning. #168
  • Exponential Backoff with Jitter: Added exponential backoff with jitter for deadlock mitigation, improving job processing resilience in high-concurrency environments. #171
  • Queue Manager ID Column: Introduced a queue_manager_id column to support isolated queue management and improved tracking across multiple managers. #175
  • alive Property Deprecation: Issued a deprecation warning on the alive property to encourage migration to shutdown. #176
  • Async Generator for Job Dequeuing: Refactored job dequeuing logic into an async generator, enhancing efficiency and readability. #174

Full Changelog: v0.13.0...v0.14.0

v0.13.0

29 Oct 20:52
e7d64bb
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.12.0...v0.13.0

v0.12.0

29 Oct 11:58
4a7350a
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.11.0...v0.12.0

v0.11.0

29 Oct 11:09
da889dd
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.10.0...v0.11.0

v0.10.0

09 Oct 19:03
1745bee
Compare
Choose a tag to compare

Im excited to announce Serialized Dispatch for PGQueuer!

Serialized Dispatch ensures jobs of the same type are processed one at a time, perfect for avoiding race conditions when modifying shared resources.

Example

Define an entrypoint with Serialized Dispatch:

@qm.entrypoint("data_processing", serialized_dispatch=True)
async def data_processing(job):
    # Job processing logic
    ...

This ensures only one data_processing job runs at a time, avoiding concurrent modifications.

Other changes

Full Changelog: v0.9.2...v0.10.0

v0.9.2

03 Oct 19:30
5d7e8cd
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.9.1...v0.9.2