taskline 0.4.2

A simple distributed task queue for Rust
Documentation

Taskline

Crates.io CI Docs.rs

The library allows to create scheduled tasks via Redis for Rust.

producer.schedule("Hello!".to_string(), now() + 30000.).await;

loop {
    let tasks = consumer.poll(now()).await.unwrap();
    if tasks.is_empty() {
        sleep(Duration::from_millis(100)).await;
        continue;
    }
    for task in tasks {
        println!("Consumed {:?}", task);
    }
}

That means the Consumed will be printed in 30 seconds.

You can customize a format of an event for redis. Write your wrapper over RedisBackend. See redis_json backend.

diagram

Features

  • Send/receive tasks in redis
  • Delayed tasks
  • Support json
  • Support redis cluster
  • Tasks which are deleted from storage after handling. Right now tasks are deleted before handling

Installation

Cargo

cargo add taskline

License

Contribution

CONTRIBUTING.md