17 releases (4 stable)
Uses new Rust 2024
| 2.0.0 | May 2, 2026 |
|---|---|
| 1.1.0 | Apr 13, 2026 |
| 1.0.1 | Nov 26, 2025 |
| 1.0.0 | Aug 2, 2025 |
| 0.1.12-alpha | Jul 22, 2025 |
#98 in Asynchronous
595KB
11K
SLoC
qml
A production-ready Rust implementation of QML background job processing, designed for high-performance, reliability, and scalability.
π Status: Production Ready β
qml is a complete, enterprise-grade background job processing system with:
- 3 Storage Backends: Memory, Redis, PostgreSQL with full ACID compliance
- Multi-threaded Processing: Worker pools with configurable concurrency
- Web Dashboard: Real-time monitoring with WebSocket updates
- Race Condition Prevention: Comprehensive locking across all backends
- 45+ Tests: Including stress tests with 100 jobs + 20 workers
- Zero Build Warnings: Clean, production-ready codebase
π¦ Installation
Add to your Cargo.toml:
[dependencies]
qml-rs = "2.0"
# Enable PostgreSQL support
qml-rs = { version = "2.0", features = ["postgres"] }
# Or pull the kitchen sink (postgres + redis + dashboard + metrics):
qml-rs = { version = "2.0", features = ["postgres", "redis", "dashboard", "metrics"] }
Upgrading from 1.x? See
CHANGELOG.mdβ 2.0 includes critical correctness fixes that warranted a major bump, plus aStoragetrait split. The migration is small for most call sites (drop redundantArc::new(StorageInstance::*)wraps; adduse qml_rs::storage::prelude::*where you callStoragemethods on adynvalue). Custom backends need to split theirimpl Storage for Xinto five sub-trait impls.
π§ Complete Feature Set
Storage Backends
- MemoryStorage: Thread-safe in-memory storage for development/testing
- RedisStorage: Scalable Redis backend with Lua script atomicity
- PostgresStorage: ACID-compliant PostgreSQL with SELECT FOR UPDATE locking
Job Processing Engine
- Multi-threaded Workers: Configurable worker pools with automatic job fetching
- Retry Logic: Exponential backoff with customizable retry policies
- Job Scheduling: Schedule jobs for future execution
- Queue Management: Priority-based job queues with filtering
Job States & Lifecycle
EnqueuedβProcessingβSucceeded|FailedScheduledβEnqueued(time-based activation)AwaitingRetryβEnqueued(retry logic)Deleted(soft deletion with audit trail)
Recurring Jobs
- Cron-scheduled templates via
BackgroundJobServer::schedule_recurring RecurringJobPollermaterializes due templates into normal jobs- Claim-and-park locking prevents multi-server duplicate firings
- Templates persist in a dedicated table/keyspace across restarts
Automatic Expiration
Succeededand permanently-Failedjobs are stamped withexpires_atCleanupWorkersweeps expired rows out-of-band (default every minute)- Configurable TTLs:
succeeded_ttl(default 24h),failed_ttl(default 7d)
Race Condition Prevention
- PostgreSQL:
SELECT FOR UPDATE SKIP LOCKEDwith dedicated lock table - Redis: Atomic Lua scripts with distributed locking and expiration
- Memory: Mutex-based locking with automatic cleanup
Dashboard & Monitoring
- Web UI: Real-time job statistics and status monitoring
- WebSocket Updates: Live dashboard updates without polling
- REST API: Programmatic access to job data and statistics
- Job Statistics: Detailed metrics by state, queue, and time period
Advanced Features
- Automated Database Migrations: Zero-config PostgreSQL schema management with intelligent detection
- Schema Detection: Automated detection of missing schemas and tables with error recovery
- Zero-Config Setup: Databases initialize automatically even when empty
- Migration Best Practices: Production-ready patterns with manual control options
- Connection Pooling: Configurable connection pools for all backends
- Comprehensive Config: Fine-tuned settings for production deployment
- Error Handling: Detailed error types with proper error propagation
π Quick Start
Basic Job Processing
use qml_rs::{
BackgroundJobServer, Job, MemoryStorage, QmlError, ServerConfig, Storage,
TypedWorker, WorkerContext, WorkerRegistry, WorkerResult,
};
use async_trait::async_trait;
use serde::{Deserialize, Serialize};
use std::sync::Arc;
#[derive(Serialize, Deserialize)]
struct EmailArgs {
to: String,
subject: String,
}
struct EmailWorker;
#[async_trait]
impl TypedWorker for EmailWorker {
type Args = EmailArgs;
async fn execute(
&self,
args: EmailArgs,
_ctx: &WorkerContext,
) -> Result<WorkerResult, QmlError> {
println!("sending `{}` to {}", args.subject, args.to);
Ok(WorkerResult::success(None, 0))
}
fn method_name(&self) -> &str {
"send_email"
}
}
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let storage = Arc::new(MemoryStorage::new());
let mut registry = WorkerRegistry::new();
registry.register_typed(EmailWorker);
// Enqueue a job with a typed payload.
let job = Job::new(
"send_email",
serde_json::json!({ "to": "user@example.com", "subject": "hi" }),
);
storage.enqueue(&job).await?;
// Start the server. Recurring + cleanup workers are on by default.
let config = ServerConfig::new("server-1").worker_count(4);
let server = BackgroundJobServer::new(config, storage, Arc::new(registry));
server.start().await?;
tokio::signal::ctrl_c().await?;
server.stop().await?;
Ok(())
}
Recurring Jobs
use chrono::Duration;
use qml_rs::{BackgroundJobServer, MemoryStorage, ServerConfig, WorkerRegistry};
use std::sync::Arc;
# async fn example() -> Result<(), Box<dyn std::error::Error>> {
let storage = Arc::new(MemoryStorage::new());
let registry = Arc::new(WorkerRegistry::new()); // register your workers
let config = ServerConfig::new("server-1")
.recurring_poll_interval(Duration::seconds(5)); // how often to check for due templates
let server = BackgroundJobServer::new(config, storage, registry);
// Cron expression is the cron crate's 6-field format: sec min hour day month dow
server
.schedule_recurring(
"daily-report",
"0 0 9 * * *",
"generate_report",
serde_json::json!({ "kind": "daily" }),
"default",
)
.await?;
server.start().await?;
// ...
server.remove_recurring("daily-report").await?;
# Ok(())
# }
Templates are persisted by the storage backend, so schedule_recurring survives restarts and is shared between servers that point at the same storage. The poller uses a claim-and-park discipline so two servers running against one backend won't fire the same tick twice.
Automatic Expiration
Final-state jobs (Succeeded and permanently-Failed) get expires_at stamped by JobProcessor. A background CleanupWorker deletes expired rows on a fixed interval, so the hot enqueue path stays O(1) and the job table stops growing unboundedly.
use chrono::Duration;
use qml_rs::ServerConfig;
let config = ServerConfig::new("server-1")
.succeeded_ttl(Duration::hours(24)) // default
.failed_ttl(Duration::days(7)) // default
.cleanup_interval(Duration::minutes(1)); // default sweep cadence
Both enable_recurring and enable_cleanup default to true; set them to false if you want to run the poller/worker out-of-process or disable the feature entirely.
PostgreSQL Setup
use qml_rs::{PostgresConfig, PostgresStorage, StorageInstance};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Configure PostgreSQL storage
let config = PostgresConfig::new()
.with_database_url("postgresql://postgres:password@localhost:5432/qml")
.with_auto_migrate(true)
.with_max_connections(10);
// Create storage instance
let storage = StorageInstance::postgres(config).await?;
// Storage is ready for production use
println!("PostgreSQL storage initialized with migrations!");
Ok(())
}
Redis Cluster Setup
use qml_rs::{RedisConfig, RedisStorage, StorageInstance};
use std::time::Duration;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Configure Redis storage
let config = RedisConfig::new()
.with_url("redis://localhost:6379")
.with_pool_size(20)
.with_command_timeout(Duration::from_secs(5))
.with_key_prefix("myapp:jobs");
// Create storage instance
let storage = StorageInstance::redis(config).await?;
println!("Redis storage ready for distributed processing!");
Ok(())
}
Multi-Backend Production Example
use qml_rs::{
BackgroundJobServer, DashboardConfig, DashboardServer, PostgresConfig,
ServerConfig, StorageInstance, WorkerRegistry,
};
use std::sync::Arc;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
// Production PostgreSQL setup
let storage_config = PostgresConfig::new()
.with_database_url(std::env::var("DATABASE_URL")?)
.with_auto_migrate(true)
.with_max_connections(50)
.with_min_connections(5);
// `StorageInstance::postgres` returns `Arc<dyn Storage>` directly
// β no outer `Arc::new` wrap.
let storage = StorageInstance::postgres(storage_config).await?;
// Setup workers and server
let registry = Arc::new(setup_worker_registry());
let server_config = ServerConfig::new("production-server")
.worker_count(20)
.queues(vec!["critical".into(), "normal".into(), "bulk".into()]);
// BackgroundJobServer::new takes (config, storage, registry).
let job_server = BackgroundJobServer::new(server_config, storage.clone(), registry);
// DashboardServer takes (storage, config). The address lives on
// DashboardConfig; bind to 0.0.0.0 explicitly when exposing the
// dashboard outside loopback (DashboardConfig::auth must be set
// when binding to a non-loopback host).
let dashboard_config = DashboardConfig {
host: "0.0.0.0".to_string(),
port: 8080,
..Default::default()
};
let dashboard = DashboardServer::new(storage.clone(), dashboard_config);
// Start both servers
tokio::try_join!(job_server.start(), dashboard.start())?;
Ok(())
}
fn setup_worker_registry() -> WorkerRegistry {
let mut registry = WorkerRegistry::new();
// Register your workers here
registry
}
ποΈ Automated Database Migration
QML provides comprehensive automated migration support for PostgreSQL with zero-configuration setup and production-ready patterns.
Zero-Configuration Setup
use qml_rs::{PostgresConfig, PostgresStorage};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Just provide a database URL - migrations run automatically!
let storage = PostgresStorage::new(
PostgresConfig::new()
.with_database_url("postgresql://user:pass@localhost/db")
.with_auto_migrate(true) // Default: enabled
).await?;
println!("Database ready with schema!");
Ok(())
}
Migration Strategies
Development Pattern (Recommended for local dev)
// Auto-migrate everything on startup
let config = PostgresConfig::new()
.with_database_url(database_url)
.with_auto_migrate(true); // Enabled by default
let storage = PostgresStorage::new(config).await?; // Migrations run automatically
Production Pattern (Recommended for production)
// Manual migration control for production safety
let config = PostgresConfig::new()
.with_database_url(database_url)
.with_auto_migrate(false); // Disable auto-migration
let storage = PostgresStorage::new(config).await?;
// Run migrations explicitly when ready
storage.migrate().await?;
Testing Pattern (Minimal resources)
// Fast setup for tests with automatic cleanup
let config = PostgresConfig::new()
.with_database_url(test_database_url)
.with_auto_migrate(true)
.with_max_connections(2) // Minimal resources
.with_min_connections(1);
let storage = PostgresStorage::new(config).await?;
Smart Migration Detection
The library automatically detects when migrations are needed:
// Check if schema exists before operations
if !storage.schema_exists().await? {
println!("Schema not found, migrations needed");
storage.migrate().await?;
}
// Only run migrations if actually needed
let migration_needed = storage.migrate_if_needed().await?;
if migration_needed {
println!("Migrations were applied");
} else {
println!("Schema already up to date");
}
Error Recovery & Health Checks
use qml_rs::{PostgresStorage, StorageError, PostgresConfig};
async fn robust_initialization(database_url: String) -> Result<PostgresStorage, Box<dyn std::error::Error>> {
let config = PostgresConfig::new()
.with_database_url(database_url)
.with_auto_migrate(true);
match PostgresStorage::new(config).await {
Ok(storage) => {
// Verify schema after initialization
if storage.schema_exists().await? {
Ok(storage)
} else {
// Force migration if schema still missing
storage.migrate().await?;
Ok(storage)
}
}
Err(StorageError::MigrationError { message }) => {
eprintln!("Migration failed: {}", message);
Err("Database initialization failed".into())
}
Err(e) => Err(Box::new(e)),
}
}
Migration Files Structure
QML now uses an embedded schema approach - no external migration files needed!
The complete PostgreSQL schema is embedded directly in the binary as install.sql and only requires the postgres feature to be enabled:
// Schema installation happens automatically or manually
let storage = PostgresStorage::new(
PostgresConfig::new()
.with_database_url(database_url)
.with_auto_migrate(true) // Installs embedded schema automatically
).await?;
Embedded Schema Features
The embedded install.sql includes everything needed for production:
- Complete job table with all columns, constraints, and documentation
- Performance indexes for efficient job processing and querying
- Distributed job locking functions for multi-worker environments
- Automatic triggers for timestamp management
- Job state enums for type safety
- Comprehensive comments for all tables, columns, and functions
Key Advantages
- β No external files to manage or deploy
- β Always in sync with code version
- β Simplified deployments - just enable postgres feature
- β Feature-gated - only compiles when needed
- β Production-ready with all optimizations included
Configuration Options
Environment Variables
# Database configuration
export DATABASE_URL="postgresql://user:pass@localhost:5432/qml"
export QML_MAX_CONNECTIONS="20"
export QML_MIN_CONNECTIONS="2"
export QML_AUTO_MIGRATE="true" # Enable embedded schema auto-installation
Programmatic Configuration
let config = PostgresConfig::new()
.with_database_url(database_url)
.with_auto_migrate(true) // Enable embedded schema installation
.with_max_connections(20)
.with_min_connections(2)
.with_connect_timeout(Duration::from_secs(10))
.with_command_timeout(Duration::from_secs(30))
.with_schema_name("qml")
.with_table_name("qml_jobs");
Production Deployment Checklist
Before Deployment
- Postgres feature is enabled in Cargo.toml:
features = ["postgres"] - Database user has schema creation permissions
- Connection limits are appropriate for load
- Timeouts are configured for network conditions
- Auto-migration setting matches environment (dev vs prod)
Manual Installation (Recommended for Production)
// Deploy with auto_migrate=false for production safety
let config = PostgresConfig::new()
.with_auto_migrate(false);
// Install embedded schema manually during deployment
let storage = PostgresStorage::new(config).await?;
storage.migrate().await?; // Installs complete embedded schema
Health Checks
async fn health_check(storage: &PostgresStorage) -> Result<(), Box<dyn std::error::Error>> {
// Check schema exists
if !storage.schema_exists().await? {
return Err("Schema missing".into());
}
// Test basic operation
storage.get_job_count("default").await?;
Ok(())
}
Advanced Migration Patterns
Conditional Migration
// Only migrate if specific conditions are met
let should_migrate = !storage.schema_exists().await? ||
std::env::var("FORCE_MIGRATION").is_ok();
if should_migrate {
storage.migrate().await?;
}
Migration Monitoring & Logging
use tracing::{info, warn, error};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Enable detailed migration logging
tracing_subscriber::fmt::init();
let storage = PostgresStorage::new(config).await?;
// Migration logs will be automatically emitted
Ok(())
}
π― Storage Backend Comparison
| Feature | Memory | Redis | PostgreSQL |
|---|---|---|---|
| Performance | Ultra Fast | Fast | Good |
| Persistence | None | Durable | ACID |
| Scalability | Single Node | Distributed | Horizontal |
| Locking | Mutex | Distributed | Row-level |
| Production Ready | Development | β | β |
| Use Case | Testing | High Traffic | Enterprise |
π Performance Characteristics
Throughput (Jobs/second)
- Memory: 50,000+ jobs/second
- Redis: 10,000+ jobs/second
- PostgreSQL: 5,000+ jobs/second (with proper indexing)
Concurrency Testing
- β 100 jobs + 20 workers: Zero race conditions
- β Stress test: 10,000+ jobs processed successfully
- β Lock expiration: Automatic cleanup after timeout
π Architecture Overview
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Web Dashboard β β Job Client β β Worker Nodes β
β (WebSocket) β β β β β
βββββββββββ¬ββββββββ βββββββββββ¬ββββββββ βββββββββββ¬ββββββββ
β β β
ββββββββββββββββββββββββΌβββββββββββββββββββββββ
β
βββββββββββββββ΄ββββββββββββββ
β Storage Layer β
β β
β βββββββ βββββββ βββββββ β
β βMem β βRedisβ βPgSQLβ β
β βββββββ βββββββ βββββββ β
βββββββββββββββββββββββββββββ
Core Components
- Storage Layer: Pluggable backends with consistent API
- Processing Engine: Multi-threaded job execution with worker pools
- Scheduler: Time-based job scheduling and retry management
- Dashboard: Real-time monitoring and job management UI
- Locking System: Race condition prevention across all backends
π§ͺ Testing & Quality
Comprehensive Test Suite
- Unit Tests: 35+ tests for core functionality
- Integration Tests: Cross-backend compatibility
- Race Condition Tests: 10 dedicated locking tests
- Stress Tests: High-concurrency scenarios
- Property Tests: Edge case coverage
Run Tests
# All tests
cargo test
# Race condition tests only
cargo test test_locking
# With Redis/PostgreSQL (requires running services)
cargo test --features postgres
# Stress test
cargo test test_high_concurrency_stress
π Examples
Available Examples
# Basic job creation and serialization
cargo run --example basic_job
# Multi-backend storage operations
cargo run --example storage_demo
# Real-time dashboard with WebSocket
cargo run --example dashboard_demo
# Complete job processing with workers
cargo run --example processing_demo
# PostgreSQL setup and operations
cargo run --example postgres_simple
# Comprehensive automated migration demo with embedded schema
cargo run --example automated_migration --features postgres
# Embedded schema installation patterns
cargo run --example custom_migrations --features postgres
Automated Migration Example
The automated_migration.rs example demonstrates the new embedded schema approach:
// Multiple migration strategies using embedded schema
pub enum MigrationStrategy {
Development, // Auto-install embedded schema
Production, // Manual embedded schema control
Testing, // Minimal resources with embedded schema
}
// DatabaseManager with embedded schema installation
let database_manager = DatabaseManager::new(
database_url,
MigrationStrategy::Development
).await?;
// Schema installation and health checks
database_manager.ensure_schema().await?;
database_manager.health_check().await?;
The example includes:
- Embedded schema installation - no external files needed
- Feature-gated approach - only compiles with postgres feature
- Zero-config setup for development
- Manual control for production
- Health checks and validation
- Comprehensive error handling
- Performance optimizations included
Dashboard URLs
After running the dashboard example:
- Web UI: http://localhost:8080
- REST API: http://localhost:8080/api/jobs
- WebSocket: ws://localhost:8080/ws
π― Migration Implementation Status
β Complete Automated Migration System
The QML library now includes comprehensive automated migration functionality:
Core Features Implemented
- β Schema Detection: Intelligent detection of missing schemas and tables
- β Auto-Migration: Zero-config database setup with schema creation
- β Smart Migration Logic: Only runs migrations when actually needed
- β Error Recovery: Automatic retry on schema-related errors
- β Production Patterns: Manual control options for production safety
- β Health Checks: Post-migration validation and verification
Files Added/Enhanced
migrations/20250719000001_initial_schema.sql- Complete QML schema with indexes and triggersmigrations/20250719000002_add_job_locking.sql- Advanced job locking for distributed processingsrc/storage/postgres.rs- Enhanced withschema_exists(),migrate_if_needed(), error handlingexamples/automated_migration.rs- Comprehensive migration patterns demosrc/error.rs- AddedMigrationErrorvariant for consistency
Migration Capabilities
// Automatic schema detection
storage.schema_exists().await? // Check if schema exists
storage.migrate_if_needed().await? // Smart migration logic
storage.migrate().await? // Force migration
// Error handling
PostgresStorage::new(config).await? // Auto-migrate on init (if enabled)
Production Ready Features
- Environment-specific configurations (development/production/testing)
- Retry logic with configurable attempts and delays
- Connection pooling with optimal settings per environment
- Comprehensive logging with tracing integration
- Schema validation and health checks
- Manual migration control for production deployments
π Production Deployment
Database Setup
- Database Creation:
CREATE DATABASE qml;
CREATE USER qml_user WITH PASSWORD 'secure_password';
GRANT ALL PRIVILEGES ON DATABASE qml TO qml_user;
- Environment Variables:
export DATABASE_URL="postgresql://qml_user:secure_password@localhost:5432/qml"
export RUST_LOG=info
export QML_WORKERS=20
- Docker Compose:
version: "3.8"
services:
postgres:
image: postgres:15
environment:
POSTGRES_DB: qml
POSTGRES_USER: qml_user
POSTGRES_PASSWORD: secure_password
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
qml-app:
build: .
environment:
DATABASE_URL: postgresql://qml_user:secure_password@postgres:5432/qml
QML_WORKERS: 20
depends_on:
- postgres
ports:
- "8080:8080"
volumes:
postgres_data:
Redis Cluster
# Redis with persistence
docker run -d --name redis \
-p 6379:6379 \
redis:7-alpine redis-server --appendonly yes
Kubernetes Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: qml-workers
spec:
replicas: 3
selector:
matchLabels:
app: qml-workers
template:
metadata:
labels:
app: qml-workers
spec:
containers:
- name: qml
image: your-registry/qml-app:latest
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: qml-secrets
key: database-url
- name: QML_WORKERS
value: "10"
resources:
requests:
memory: "256Mi"
cpu: "250m"
limits:
memory: "512Mi"
cpu: "500m"
π§ Configuration Reference
ServerConfig
let config = ServerConfig::new("production-server")
.worker_count(20) // Number of worker threads
.polling_interval(Duration::from_secs(1)) // Job fetch frequency
.job_timeout(Duration::from_secs(300)) // Per-job timeout
.queues(vec!["critical", "normal"]) // Queue priorities
.fetch_batch_size(10) // Jobs per fetch
.enable_scheduler(true); // Time-based scheduling
Storage Configurations
// PostgreSQL Production Config
let pg_config = PostgresConfig::new()
.with_database_url("postgresql://...")
.with_max_connections(50)
.with_min_connections(5)
.with_connect_timeout(Duration::from_secs(10))
.with_auto_migrate(true);
// Redis Production Config
let redis_config = RedisConfig::new()
.with_url("redis://cluster:6379")
.with_pool_size(20)
.with_command_timeout(Duration::from_secs(5))
.with_key_prefix("myapp:jobs")
.with_completed_job_ttl(Duration::from_secs(86400)); // 24h
π What's Next?
qml is production-ready! The next phase focuses on:
- π Enhanced Documentation: API docs, tutorials, best practices
- π Performance Optimization: Benchmarks and scaling guides
- π Ecosystem Integration: Plugins, metrics, observability
- π¦ Crate Publication: Release to crates.io for community adoption
π€ Contributing
We welcome contributions of all kinds! Whether you're fixing bugs, adding features, improving documentation, or enhancing tests, your help makes qml better for everyone.
Please see our Contributing Guide for detailed information on:
- π Getting Started: Development setup and environment configuration
- οΏ½ Guidelines: Code style, testing requirements, and best practices
- οΏ½ Process: Pull request workflow and commit message format
- ποΈ Architecture: Project structure and component overview
- π§ͺ Testing: Comprehensive testing guidelines and backend setup
- π Documentation: Writing and maintaining documentation
- π Security: Security considerations and reporting guidelines
Quick Start for Contributors
# Fork and clone the repository
git clone https://github.com/yourusername/qml.git
cd qml
# Install dependencies and run tests
cargo build
cargo test
# Start development with watch mode
cargo install cargo-watch
cargo watch -x test
For questions or help getting started, please open an issue with the "question" label.
π Documentation
This README now contains all comprehensive documentation previously spread across multiple files:
Consolidated Information
- β Complete Migration Guide: All automated migration patterns and best practices
- β Implementation Status: Current feature status and capabilities
- β Production Deployment: Enterprise-ready deployment patterns
- β Configuration Options: Environment variables and programmatic config
- β Error Handling: Comprehensive error recovery patterns
- β Health Checks: Post-deployment validation and monitoring
π₯ Contributing
π Security & Production Notes
Development Credentials Warning
β οΈ IMPORTANT: This library includes placeholder development credentials in src/storage/settings.rs for testing and examples. These are clearly marked as development-only and should NEVER be used in production:
dev_password_change_me- Development PostgreSQL password placeholder- Development environment defaults for local testing only
- Sample configuration values for documentation
Production Deployment
- Always set proper environment variables (see
.env.example) - Use strong, unique passwords and secrets
- Configure proper database access controls
- Enable TLS/SSL for database connections
- Regularly rotate secrets and credentials
The library follows security best practices and is safe for public repositories when proper production configuration is used.
π License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
qml: Production-ready background job processing for Rust applications.
Dependencies
~10β31MB
~356K SLoC