A demo of using celery in Flask with Application Factories.
-
Set up the virtualenv:
pipenv install
-
Refer here to configure and start PostgreSQL service.
You can also find a more detailed tutorial at ArchWiki.
-
Refer here to install and start RabbitMQ.
-
Initialize the database.
flask initdb
-
Kickoff a celery worker:
celery -A app.celery worker
-
Run flask sever:
flask run