job_queue
Setup
Usage
Create a job
use ;
Create a queue and dispatch a job
use ;
let queue = builder
.connect // or postgres://root:@localhost/job_queue
.await?;
queue
.dispatch
.await?;
Create a worker
let worker = builder
.max_connections
.worker_count
.connect // or postgres://root:@localhost/job_queue
.await?;
worker.start.await?;
loop
TODO:
- save failed jobs
- emit events, failing, stopping, before and after processing a job