This package is an extension of huey contrib djhuey package that allows users to manage multiple queues.

Compatible versions

Package Version
Django 2.2
Django 3.1
Django 3.2
huey 2.3


Using pip package manager run:

pip install django-huey

Note: use a virtualenv to isolate your dependencies.

Then, in your file add django_huey to the INSTALLED_APPS:



In you must add the DJANGO_HUEY setting:

    'default': 'first', #this name must match with any of the queues defined below.
    'queues': {
        'first': {#this name will be used in decorators below
            'huey_class': 'huey.RedisHuey',  
            'name': 'first_tasks',  
            'consumer': {
                'workers': 2,
                'worker_type': 'thread',
        'emails': {#this name will be used in decorators below
            'huey_class': 'huey.RedisHuey',  
            'name': 'emails_tasks',  
            'consumer': {
                'workers': 5,
                'worker_type': 'thread',


Now you will be able to run multiple queues using:

python djangohuey --queue first
python djangohuey --queue emails

Each queue must be run in a different terminal.

If you defined a default queue, you can just run:

python djangohuey

And the default queue will be used.

Configuring tasks

You can use usual huey decorators to register tasks, but they must be imported from django_huey as shown below:

from django_huey import db_task, task

@task() #Use the default queue 'first'
def some_func_that_uses_default_queue():
    # perform some db task

def some_func():
    # perform some db task

def send_mails():
	# send some emails

All the args and kwargs defined in huey decorators should work in the same way, if not, let us know.