A RabbitMQ asynchronous task queue for Django.
Project description
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
Add carrot to your Django project’s settings module:
INSTALLED_APPS = [
...
'carrot',
...
]
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-carrot-dev-263.tar.gz
.
File metadata
- Download URL: django-carrot-dev-263.tar.gz
- Upload date:
- Size: 198.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 094cc5f0f9268d94ae8c58f68685b84c1e5eef2085bf381259fc97bb76355cff |
|
MD5 | c0d534387058f46a9ce3ee2a02affaf7 |
|
BLAKE2b-256 | 1eaabd1daa6eaf03cc92e060a720046f672fbbed7ba92255a208eb7e23bfcec2 |