Skip to content

A repo for Django Celery using Elastic Cache as broker.

Notifications You must be signed in to change notification settings

yokwejuste/aws-django-redis

Repository files navigation

AWS Django Celery Redis using ElasticCache

To run this project you need to have an AWS account and a Redis ElasticCache instance running.

Steps to run the project:

  1. Clone the repository
  2. Create a virtual environment and activate it
  3. Install the requirements
  4. Create a .env file with the following command:
    cp .env.example .env
  5. Fill the .env file with your AWS credentials and the Redis ElasticCache endpoint
  6. Run the Django server with the following command:
    python manage.py runserver
  7. Run the Celery worker with the following command:
    celery -A aws_django_celery_redis worker --loglevel=info

OR

Run this with docker

docker run -p 8000:8000 <aws_django_celery_redis_image>

Test Caching and broker

Go to http://localhost:8000/add/ to view your task id

About

A repo for Django Celery using Elastic Cache as broker.

Topics

Resources

Stars

Watchers

Forks