Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leafney/flask_celery_demo
Flask Celery 4.1.0 Blueprint
https://github.com/leafney/flask_celery_demo
blueprint celery flask
Last synced: 2 months ago
JSON representation
Flask Celery 4.1.0 Blueprint
- Host: GitHub
- URL: https://github.com/leafney/flask_celery_demo
- Owner: leafney
- Created: 2017-12-27T09:29:08.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-01-06T22:24:13.000Z (about 3 years ago)
- Last Synced: 2023-02-28T23:11:37.309Z (almost 2 years ago)
- Topics: blueprint, celery, flask
- Language: Python
- Homepage:
- Size: 14.6 KB
- Stars: 10
- Watchers: 1
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Flask Celery Demo
* Python3
* Flask
* Celery
* Blueprint#### Quick Setup
1. Clone this repository.
2. Create virtualenv (1. `mkdir flaskdemo` 2. `pyvenv venv` 3. `source venv/bin/active`)
3. Install requirements (`pip install requirements.txt`)
4. Set Celery broker_url of Redis in `jobs/celeryconfig.py`
5. Set two environment variables `MAIL_USERNAME` and `MAIL_PASSWORD` to 163.com . Set environment variables:
```
export MAIL_USERNAME='your_163_email_addr'
export MAIL_PASSWORD='your_163_email_pwd'
```
(this demo use 163.com,use other email SMTP server by yourself configued in `config.py`)
6. Open a terminal window run flask web(`python run.py`)
7. Open a second terminal window start a Celery worker (`celery worker -A celery_worker.celery -l=info`)
8. Open a third terminal window start a Celery worker (`celery beat -A celery_worker.celery -l=info`)
9. Or Run (`celery worker -B -A celery_worker.celery -l=info`) instead of step 7 and step 8
10. Go to `http://localhost:5000/` test.
11. Enjoy it.