/celery-redis-queue

Celery and Redis Queue in FastAPI

Primary LanguagePython

Communication over Celery

Installation

$ pip install - requirements.txt

Execution

4 terminals are needed to run.

  1. Start Redis locally
$ brew install redis
$ redis-server
  1. Celery Server
$ python main.py --mode celery
  1. Listener
$ python main.py --mode listener
  1. Open Python Shell
$ python
>>> from tasks import add
>>> task = add.delay(1, 3) # Insert any numbers

Notice

  • Please install latest version(>= 1.2.0) of flower, the celery monitoring tool.

Refs.