Blog / Celery

How to delete all queues in RabbitMQ

January 21, 2018

I recently had to do this for one of my older Django projects that uses Celery as I made the mistake of using the broker as the result backend.

Using "amqp" as the result backend is not recommended in production as this will create a queue for each task. I noticed I was getting a warning for the file descriptors in the RabbitMQ web management dashboard.

From the web management (available by installing the management …

Retry decorator for Python 3

September 1, 2017

When your app relies on making API calls to external resources, you should expect that there will be network issues from time to time and you should prepare for them.

While these will be rare relative to the number of requests you're making, handling them early on could really save you a lot of headache in the future as your app usage grows. Many of these things can be easily handled with a simple retry …

Generating a signed URL for an Amazon S3 file using boto

April 9, 2017

I was refactoring some code for EZ Exporter, a data exporter app for Shopify, last week as our customer base has been growing pretty steadily these last few months. I figured it's time to do some optimization to make sure the app is ready for future growth.

One of the functionalities that we needed to optimize is how we handle manual downloads. Initially, I just made it very simple by returning the data as …

Using Amazon SQS with Django and Celery

August 31, 2015

I'm currently working on a new Django project which relies heavily on Celery. I normally use RabbitMQ for these kinds of projects but I decided to give Amazon SQS a try this time as it's very cheap and will simplify my setup.

While the Celery docs does a pretty good job explaining how to set it up, there were a few things that it didn't cover that I'm sure other devs will run into. …