Skip to content
Supporting project for my toptal article
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
celery_uncovered
config
docker/mailhog
docs
requirements added: toyex task - produce_hot_repo_report_task(ref_date) May 25, 2017
tests
utility
.coveragerc
.dockerignore project scaffold May 18, 2017
.editorconfig
.gitattributes
.gitignore
.pylintrc
.travis.yml project scaffold May 18, 2017
CONTRIBUTORS.txt
Dockerfile
LICENSE project scaffold May 18, 2017
README.rst updated: main Readme file with link to Readme file for toyex Aug 30, 2017
celery_uncovered_dev
env.example
manage.py project scaffold May 18, 2017
pytest.ini testing configured May 19, 2017
setup.cfg project scaffold May 18, 2017

README.rst

Celery Uncovered

Supporting project for my TopTal article.

This repository is intended to help the beginners better understand celery by usecases. It also shows some really nice (undocumented) tricks that could give lots of benefits while developing celery-based projects.

Built with Cookiecutter Django
License:MIT

Django-Applications

toyex

contains widely used (simple) examples of using celery to solve background tasks

advex

contains generic patterns of using celery to facilitate workflow execution and many others (soon)

tricks

contains generic examples of extending default `celery.app.Task` and some undocument tricks such as:
  • verbose logging
  • scope injection
  • freezing task

Extra Details

Celery

This app comes with Celery.

To run a celery worker:

cd celery_uncovered
celery -A celery_uncovered worker -l info

Please note: For Celery's import magic to work, it is important where the celery commands are run. If you are in the same folder with manage.py, you should be right.

Email Server

In development, it is often nice to be able to see emails that are being sent from your application. For that reason local SMTP server MailHog with a web interface is available as docker container.

With MailHog running, to view messages that are sent by your application, open your browser and go to http://127.0.0.1:8025

How to deploy and run it via docker you can refer to its [README.md](docker/mailhog/README.md).

Further configuration options are available in MailHog.

Running tests with py.test

$ chmod +x utility/unittest.sh
$ ./utility/unittest.sh

Live reloading and Sass CSS compilation

Moved to Live reloading and SASS compilation.

Deployment

The following details how to deploy this application.

Credits

You can’t perform that action at this time.