craziks-creator / flask-celery-demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HitCount

Ping!

This repository contains the code for this blogpost on StackAbuse.

Getting Started

Prerequisites

Kindly ensure you have the following installed on your machine:

Running the Application

  1. Clone the repository
$ git clone https://github.com/ro6ley/flask-celery-demo.git
  1. Check into the cloned repository
$ cd flask-celery-demo
  1. If you are using Pipenv, setup the virtual environment and start it as follows:
$ pipenv install && pipenv shell
  1. Install the requirements
$ pip install -r requirements.txt
  1. Start the Flask app
$ python app.py
  1. Start the Celery Cluster in a separate terminal window
$ celery worker -A app.client --loglevel=info
  1. Start Flower in another separate terminal window
$ flower -A app.client --port=5555
  1. Navigate to http://localhost:5000 and schedule an email with a message

  2. Navigate to http://localhost:5555 to view the workers and scheduled messages under Tasks section

  3. Check the receipient email inbox for the scheduled message after the time has ellapsed

Contribution

Please feel free to raise issues using this template and I'll get back to you.

You can also fork the repository, make changes and submit a Pull Request using this template.

About


Languages

Language:HTML 65.7%Language:Python 34.3%