Expand description
§Job Queue
Production-grade background agent job queue system extracted from tauri-queue. Framework-agnostic — no Tauri dependency.
§Features
- Priority-based scheduling (High, Normal, Low)
- SQLite persistence with crash recovery
- Hardware throttling (cooldown, max consecutive runs)
- Real-time cancellation during job execution
- Progress tracking via pluggable event emitter
- Pause/resume capability
§Quick Start
- Define a job type implementing
JobHandler - Create a
QueueManagerwith aQueueConfig - Add jobs with
QueueManager::add() - Spawn the executor with
QueueManager::spawn()
Re-exports§
pub use config::QueueConfig;pub use config::QueueConfigBuilder;pub use error::QueueError;pub use executor::ProcessedJob;pub use queue::QueueManager;pub use types::FailureClass;pub use types::JobResult;pub use types::QueueJob;pub use types::QueueJobDetails;pub use types::QueueJobStatus;pub use types::QueuePriority;pub use types::QueueStats;
Modules§
Structs§
- JobContext
- Context provided to job handlers during execution.
- Logging
Event Emitter - A logging event emitter that logs events via
tracing. - Noop
Event Emitter - A no-op event emitter that discards all events.
Traits§
- JobHandler
- Trait that job types must implement to be processed by the queue.
- Queue
Event Emitter - Trait for emitting queue lifecycle events.