Expand description
Database result backend for CeleRS
This crate provides PostgreSQL and MySQL-based storage for task results and workflow state.
§Features
- Task result storage with expiration
- Chord state management (barrier synchronization)
- Atomic counter operations
- SQL-based result queries and analytics
- Support for both PostgreSQL and MySQL
§Example
ⓘ
use celers_backend_db::PostgresResultBackend;
use celers_backend_redis::ResultBackend;
let mut backend = PostgresResultBackend::new("postgres://localhost/celers").await?;
backend.migrate().await?;
// Store task result
let meta = TaskMeta::new(task_id, "my_task".to_string());
backend.store_result(task_id, &meta).await?;Re-exports§
pub use event_persistence::DbEventPersister;pub use event_persistence::DbEventPersisterConfig;
Modules§
- event_
persistence - Database-backed event persistence for CeleRS
- result_
store - ResultStore implementation for Database backends
Structs§
- Chord
State - Chord state (for barrier synchronization)
- Mysql
Result Backend - MySQL result backend implementation
- Postgres
Result Backend - PostgreSQL result backend implementation
- Task
Meta - Task metadata stored in result backend
- Task
TtlConfig - Per-task-type TTL configuration for result expiration
Enums§
- Backend
Error - Result backend errors
- Task
Result - Task result state
Traits§
- Result
Backend - Result backend trait