Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Async Job Queue

A small, dependency-free job queue built on asyncio. It demonstrates bounded concurrency, retry policies, lifecycle management, job cancellation, and observable queue metrics.

Why this project

Background work is a core building block in backend systems. This implementation focuses on graceful shutdown, exponential retry backoff, explicit state transitions, and testable concurrency limits.

Features

  • Configurable worker pool and bounded queue
  • Exponential-backoff retries
  • Job states, results, errors, and timestamps
  • Graceful drain or immediate abort
  • Cancellation of queued work
  • Queue-level metrics
  • Async context-manager API

Quick start

python3 examples/demo.py

Tests

python3 -m unittest discover -s tests -v

Design notes

Each submitted job is stored separately from the internal queue, so callers can inspect immutable snapshots of state. Workers own state transitions, while per-job events provide efficient completion waiting without polling.

About

Dependency-free asyncio job queue with retries, metrics, and graceful shutdown

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages