simple-queue 0.1.2

A simple persistent queue implementation in Rust backed by PostgreSQL and tokio
1
2
3
4
5
6
7
8
9
10
11
use std::sync::Arc;

use crate::*;
impl SimpleQueue {
    /// Register a job handler for a specific queue.
    pub fn register_handler(&self, handler: impl Handler + 'static) -> &Self {
        let queue = handler.queue();
        self.job_registry.insert(queue, Arc::new(handler));
        self
    }
}