| Crates.io | duroxide-pg |
| lib.rs | duroxide-pg |
| version | 0.1.16 |
| created_at | 2025-11-30 07:52:50.018981+00 |
| updated_at | 2026-01-25 19:21:18.821444+00 |
| description | A PostgreSQL-based provider implementation for Duroxide, a durable task orchestration framework |
| homepage | |
| repository | https://github.com/affandar/duroxide-pg |
| max_upload_size | |
| id | 1957993 |
| size | 328,953 |
A PostgreSQL-based provider implementation for Duroxide, a durable task orchestration framework for Rust.
Note: See CHANGELOG.md for version history and breaking changes.
Add to your Cargo.toml:
[dependencies]
duroxide-pg = "0.1"
use duroxide_pg::PostgresProvider;
use duroxide::Worker;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
// Create a provider with the database URL
let provider = PostgresProvider::new("postgres://user:password@localhost:5432/mydb").await?;
// Use with a Duroxide worker
let worker = Worker::new(provider);
// ... register orchestrations and activities, then run
Ok(())
}
To isolate data in a specific PostgreSQL schema:
let provider = PostgresProvider::new_with_schema(
"postgres://user:password@localhost:5432/mydb",
Some("my_schema"),
).await?;
| Environment Variable | Description | Default |
|---|---|---|
DUROXIDE_PG_POOL_MAX |
Maximum connection pool size | 10 |
Provider and ProviderAdmin traitsprune_executions_bulk now correctly prunes running instances with old executionscleanup_schema() to drop all stored procedures (required for public schema cleanup)MIT License - see LICENSE for details.