Showing posts from February, 2019

Running tasks with Celery on Heroku guide

An example project and a basic guide showing how to run Django/Celery on Heroku.
Basic requirements First of all, let's actually set up a typical Django project for this. We would need virtualenvwrapperfor that. One could use any other particular method. I prefer this one.
$ cd dev $ mkvirtualenv dch (dch)$ pip install django (dch)$ django-admin startproject djheroku (dch)$ cd djheroku # Make sure is working:(dch)$ ./ runserver From now I will consider working on a terminal with this (dch) environment on.
Heroku hosting setup We would need our project set up for heroku python server. The docs live HERE, as for moment of this guide writing. One would need to follow and setup a basic heroku project. I will not stop here rewriting official guide as it is good enough.
Installing celery Assuming we have a basic django dyno at heroku here we will continue.
Now let's install Celery and add it to our requirements list (as we had just started, let's just overwrite requirem…