MCPcopy Index your code
hub / github.com/badboy/oppgave

github.com/badboy/oppgave @v0.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.0 ↗ · + Follow
29 symbols 57 edges 3 files 15 documented · 52%

Browse by type

Functions 22 Types & classes 7
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

oppgave - A simple Redis-based task queue

Build Status crates.io

Inspired by Ost and Kute.

A small reliable queue on top of Redis. Allows to push tasks and fetch them again. Can handle whatever task object you hand it, as long as it can be encoded and decoded to and from JSON.

The name: oppgave - task

oppgave is Norwegian for task. So oppgave is a oppgave kø, a task queue.

Sadly, characters like ø don't play to well with stable Rust. Non-ASCII identifiers are feature-gated.

If you are okay with using nightly, you can get oppgave-kø instead and add #![feature(non_ascii_idents)] to your main crate file.

Documentation

Documentation is available online.

Installation

Add it to your dependencies in Cargo.toml

[dependencies]
oppgave = "0.1.0"

Example: Producer

See examples/worker.rs for a working example. Run it with cargo run --example worker.

#[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

See examples/worker.rs for a working example. Run it with cargo run --example worker.

#[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.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 14
Function 8
Class 5
Interface 2

Languages

Rust100%

Modules by API surface

src/lib.rs25 symbols
examples/worker.rs2 symbols
examples/producer.rs2 symbols

For agents

$ claude mcp add oppgave \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page