celers-backend-db
Version: 0.2.0 | Status: [Alpha] | Updated: 2026-03-27
Database (PostgreSQL/MySQL) result backend for CeleRS. Provides persistent task result storage, event persistence, chord state management, and optional distributed locks using SQL databases.
Features
- PostgreSQL and MySQL support via SQLx
- Task result storage with configurable TTL
- Chord barrier synchronization (atomic counters)
- Event persistence for task lifecycle tracking
- Distributed locks (optional, feature-gated)
- SQL-based result queries and analytics
Usage
Add to your Cargo.toml:
[]
= { = "0.2", = ["postgres"] }
PostgreSQL Backend
use PostgresResultBackend;
use ResultBackend;
use Uuid;
async
Event Persistence
use ;
let config = default;
let persister = new;
Feature Flags
| Feature | Default | Description |
|---|---|---|
postgres |
Yes | PostgreSQL support |
mysql |
No | MySQL support |
distributed-locks |
No | Distributed lock primitives |
Part of CeleRS
This crate is part of the CeleRS project, a Celery-compatible distributed task queue for Rust.
Testing
7 tests passing (unit tests; integration tests require PostgreSQL/MySQL)
License
Apache-2.0
Copyright (c) COOLJAPAN OU (Team Kitasan)