Skip to main content

A RabbitMQ asynchronous task queue for Django.

Project description

https://coveralls.io/repos/github/chris104957/django-carrot/badge.svg?branch=master https://readthedocs.org/projects/django-carrot/badge/?version=latest https://travis-ci.org/chris104957/django-carrot.svg?branch=master https://coveralls.io/repos/github/chris104957/django-carrot/badge.svg?branch=master https://badge.fury.io/py/django-carrot.svg https://img.shields.io/badge/License-Apache%202.0-blue.svg /docs/source/images/carrot-logo-big.png

django-carrot is a lightweight task queue backend for Django projects that uses the RabbitMQ message broker, with an emphasis on quick and easy configuration and task tracking

Installation

Install django-carrot:

pip install django-carrot

Install and run RabbitMQ

brew install rabbitmq
brew services start rabbitmq

Configuration

  1. Add carrot to your Django project’s settings module:

INSTALLED_APPS = [
    ...
    'carrot',
    ...
]
  1. Apply the carrot migrations to your project’s database:

python manage.py migrate carrot

Usage

To start the service:

python manage.py carrot_daemon start

To run tasks asynchronously:

from carrot.utilities import publish_message

def my_task(**kwargs):
    return 'hello world'

publish_message(my_task, hello=True)

To schedule tasks to run at a given interval

from carrot.utilities import create_scheduled_task

create_scheduled_task(my_task, {'seconds': 5}, hello=True)

Docker

A sample docker config is available here

Full documentation

The full documentation is available at www.django-carrot.com

Support

If you are having any issues, please log an issue

Contributing

Django-carrot uses PyPRI to share development builds. If you’d like access to it, please send me your email address at christopherdavies553@gmail.com so I can give you access

License

The project is licensed under the Apache license.

Icons made by Trinh Ho from www.flaticon.com is licensed by CC 3.0 BY

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-carrot-dev-268.tar.gz (198.9 kB view details)

Uploaded Source

File details

Details for the file django-carrot-dev-268.tar.gz.

File metadata

File hashes

Hashes for django-carrot-dev-268.tar.gz
Algorithm Hash digest
SHA256 3c144a1762ec92cb09ff89fe734f6d35a0dce3892e2e9ac5b4e31baba5b2b894
MD5 7c9ee08701a5c16288623ab78124c615
BLAKE2b-256 4de541433d5a4c61354e474573533f0d51e00d0851129faafb4e7778cb4a4fd5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page