use faktory::Worker;
use std::io::Error as IOError;
#[tokio::main]
async fn main() {
tracing_subscriber::fmt::fmt()
.with_max_level(tracing::Level::TRACE)
.init();
Worker::builder()
.register_fn("job_type", |j| async move {
println!("{:?}", j);
Ok::<(), IOError>(())
})
.connect()
.await
.expect("Connected to server")
.run_to_completion(&["default"])
.await
}