All Projects → rodolfolottin → django-sqs-celery-template

rodolfolottin / django-sqs-celery-template

Licence: other
An effortlessly pre configured Django, Celery and SQS template repository for those who want to process asynchronous background tasks.

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to django-sqs-celery-template

Kombu
Kombu is a messaging library for Python.
Stars: ✭ 2,263 (+6365.71%)
Mutual labels:  sqs, celery
celery-connectors
Want to handle 100,000 messages in 90 seconds? Celery and Kombu are that awesome - Multiple publisher-subscriber demos for processing json or pickled messages from Redis, RabbitMQ or AWS SQS. Includes Kombu message processors using native Producer and Consumer classes as well as ConsumerProducerMixin workers for relay publish-hook or caching
Stars: ✭ 37 (+5.71%)
Mutual labels:  sqs, celery
dramatiq sqs
A Dramatiq broker that can be used with Amazon SQS.
Stars: ✭ 41 (+17.14%)
Mutual labels:  sqs
immuni-backend-common
Common repository for the app backend
Stars: ✭ 90 (+157.14%)
Mutual labels:  celery
Online-Judge
Online Judge for hosting coding competitions inside NIT Durgapur made by GNU/Linux Users' Group!
Stars: ✭ 19 (-45.71%)
Mutual labels:  celery
flask-docker-compose
Flask application development skeleton with docker-compose
Stars: ✭ 22 (-37.14%)
Mutual labels:  celery
resin-home-automator
Example Python Flask web app deployable via resin.io for periodic Celery tasks
Stars: ✭ 18 (-48.57%)
Mutual labels:  celery
Liquid-Application-Framework
Liquid Application Framework documentation, useful links and sample project
Stars: ✭ 467 (+1234.29%)
Mutual labels:  sqs
terraform-aws-lambda
A Terraform module to create AWS Lambda ressources.
Stars: ✭ 40 (+14.29%)
Mutual labels:  sqs
mouth
Simple adapter based SMS sending library
Stars: ✭ 29 (-17.14%)
Mutual labels:  sqs
celery-flask-factory
Implementing Celery within a Flask application factory
Stars: ✭ 36 (+2.86%)
Mutual labels:  celery
python-flask-celery-example
Flask Rest API with the use of Celery
Stars: ✭ 41 (+17.14%)
Mutual labels:  celery
IATI.cloud
The open-source IATI datastore for IATI data with RESTful web API providing XML, JSON, CSV output. It extracts and parses IATI XML files referenced in the IATI Registry and powered by Apache Solr.
Stars: ✭ 35 (+0%)
Mutual labels:  celery
QueueBundle
QueueBundle for Symfony Framework
Stars: ✭ 40 (+14.29%)
Mutual labels:  sqs
flickr to google photos migration
A tool for migrating your photo library from Flickr to Google Photos
Stars: ✭ 39 (+11.43%)
Mutual labels:  celery
clientside aws
A client-side implementation of popular AWS services (S3, SQS, DynamoDB, Elastic Transcoder) for development + testing using ruby in docker
Stars: ✭ 39 (+11.43%)
Mutual labels:  sqs
sqs-quooler
A complete queue consumer for SQS
Stars: ✭ 23 (-34.29%)
Mutual labels:  sqs
sqs-exporter
A Prometheus Exporter for the Amazon Simple Queue Service (SQS)
Stars: ✭ 24 (-31.43%)
Mutual labels:  sqs
immuni-backend-analytics
Repository for the backend analytics
Stars: ✭ 39 (+11.43%)
Mutual labels:  celery
Stack-Lifecycle-Deployment
OpenSource self-service infrastructure solution that defines and manages the complete lifecycle of resources used and provisioned into a cloud! It is a terraform UI with rest api for terraform automation
Stars: ✭ 88 (+151.43%)
Mutual labels:  celery

django-sqs-celery-template

An effortlessly pre configured Django, Celery and SQS template repository for those who want to process asynchronous background tasks.

Getting started

Requirements

Before running this app we will need:

Running locally (docker-compose)

Inside the cloned repository folder:

  1. Copy the .env.example
cp .env.example .env
  1. Build and run the app:
docker-compose up

That's it! After building and running the app your should have 5 container services available on your machine. Now you can start developing your application and your async background tasks!

Testing it

For the local environment you can test receiving a message on the queue according to the following steps.

  • Launch a bash terminal within the web container with:
docker exec -it <docker_web_id> bash
  • Open the django shell:
python src/manage.py shell_plus
  • Import the task and execute it:
from payment.tasks import capture_payment
capture_payment.delay(pk=10)

You should see the worker docker service logs changing and a new message on the queue named "celery" if you access the panel on: http://localhost:9325

There is also the possibility of testing it through the aws-cli. To do that you need to add a new queue to the config/elasticmq.conf file because the celery queue expects the data on a specific format.

queues {
   default {
     defaultVisibilityTimeout = 10 seconds
     delay = 5 seconds
     receiveMessageWait = 0 seconds
   }
}

And now you can test it:

aws --endpoint-url http://localhost:9324 sqs send-message --queue-url http://localhost:9324/queue/default --message-body "Hello, queue"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].