huey, a little task queue — huey 0.4.3 documentation

### Navigation

- index
- next |
- huey 0.4.3 documentation »

# huey, a little task queue

a lightweight alternative.

- written in python
- no deps outside stdlib, except redis (or roll your own backend)
- support for django

supports:

- multi-threaded task execution
- scheduled execution at a given time
- periodic execution, like a crontab
- retrying tasks that fail
- task result storage

## Huey’s API

    from huey import RedisHuey, crontab

    huey = RedisHuey('my-app', host='redis.myapp.com')

    @huey.task()
    def add_numbers(a, b):
        return a + b

    @huey.periodic_task(crontab(minute='0', hour='3'))
    def nightly_backup():
        sync_all_data()

named after my cat

Contents:

- Installing
  - Using git
- Upgrading
  - Invoker became Huey
  - Decorators are methods on Huey
  - No more `BaseConfiguration`
  - Simplified Django Settings
  - Django task autodiscovery
- Getting Started
  - General guide
  - Preventing tasks from executing
- Consuming Tasks
  - Options for the consumer
  - Consumer Internals
  - Consumer Event Emitter
- Understanding how tasks are imported
  - Suggested organization of code
- Troubleshooting and Common Pitfalls
- Using Huey with Django
  - Apps
  - Huey Settings
  - Running the Consumer
  - Task API
- Huey’s API
  - Function decorators and helpers
  - AsyncData
  - Queues and DataStores

# Indices and tables

- Index
- Module Index
- Search Page

### Navigation

- index
- next |
- huey 0.4.3 documentation »