Skip to content

hussainmudassir/Using-Celery-with-Flask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Using celery with Flask

This repository contains two examples of using Celery

  1. Send Asynchronous Email
  2. Long running task with progress update

alt text

Quick Setup

Clone the repository.

->create virtualenv

$ virtualenv venv // this command to create virtual environment

->activate the virtual environment

$ source venv/bin/activate

->Install the requirements

$ pip install -r requirements.txt

Install the redis from https://redis.io/download .

How to run the project

You need to run three terminals

In first terminal,

$ cd Project-Folder

$ ./run-redis.sh

In second terminal.

$ cd Project-Folder

$ export MAIL_USERNAME=your-gmail-username

$ export MAIL_PASSWORD=your-gmail-password

$ source venv/bin/activate

(venv) $ celery worker -A app.celery --loglevel=info

In third terminal,

$ source venv/bin/activate

(venv) $ python app.py

Finally,

Go to http://localhost:5000/ and enjoy this application!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published