Coder Social home page Coder Social logo

flask_celery_demo's Introduction

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.

flask_celery_demo's People

Contributors

leafney avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.