Celery is an asynchronous task queue used to run background tasks as a distributed architechture that will enable your application to scale.
Runs with Flask application to issue background jobs
The processes that run in the background. These can be local (running with Flask on the same Machine) or remote.
Client communicates with Workers through "Message Queues" and Celery has various methods of implementing these queues. Example: RabbitMQ and Redis
Two ways to do this:
- Quick setup :
run-redis.sh
- Follow the following steps
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install redis-server
sudo systemctl enable redis-server.service
sudo vim /etc/redis/redis.conf
maxmemory 256mb
maxmemory-policy allkeys-lru
sudo systemctl restart redis-server.service
sudo apt-get install php-redis
redis-cli
127.0.0.1:6379> ping
PONG
127.0.0.1:6379>