PgQueuer is a Python library leveraging PostgreSQL for efficient job queuing.
Project description
Readme
🚀 PgQueuer - Building Smoother Workflows One Queue at a Time 🚀
📚 Documentation: Explore the Docs 📖
🔍 Source Code: View on GitHub 💾
💬 Join the Discussion: Discord Community
PgQueuer
PgQueuer is a minimalist, high-performance job queue library for Python, leveraging the robustness of PostgreSQL. Designed for simplicity and efficiency, PgQueuer uses PostgreSQL's LISTEN/NOTIFY to manage job queues effortlessly.
Features
- Simple Integration: Easy to integrate with existing Python applications using PostgreSQL.
- Efficient Concurrency Handling: Utilizes PostgreSQL's
FOR UPDATE SKIP LOCKED
for reliable and concurrent job processing. - Real-time Notifications: Leverages
LISTEN
andNOTIFY
for real-time updates on job status changes.
Installation
To install PgQueuer, simply install with pip the following command:
pip install PgQueuer
Example Usage
Here's how you can use PgQueuer in a typical scenario processing incoming data messages:
Start a consumer
Start a long-lived consumer that will begin processing jobs as soon as they are enqueued by another process.
python3 -m PgQueuer run tools.consumer.main
Start a producer
Start a short-lived producer that will enqueue 10,000 jobs.
python3 tools/producer.py 10000
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.