# oppgave - A simple Redis-based task queue
[](https://travis-ci.org/badboy/oppgave)
[](https://crates.io/crates/oppgave)
## [Documentation][]
[Documentation is available online][documentation]
[documentation]: http://badboy.github.io/oppgave
## Installation
Add it to your dependencies in `Cargo.toml`
```toml
[dependencies]
oppgave = "0.1.0"
```
## Example: Producer
```rust
#[derive(RustcDecodable, RustcEncodable)]
struct Job { id: u64 }
let client = redis::Client::open("redis://127.0.0.1/").unwrap();
let con = client.get_connection().unwrap();
let producer = Queue::new("default".into(), con);
producer.push(Job{ id: 42 });
```
## Example: Worker
```rust
#[derive(RustcDecodable, RustcEncodable)]
struct Job { id: u64 }
let client = redis::Client::open("redis://127.0.0.1/").unwrap();
let con = client.get_connection().unwrap();
let worker = Queue::new("default".into(), con);
while let Some(task) = worker.next() {
println!("Working with Job {}", job.id);
}
```
## License
MIT. See [LICENSE](LICENSE).