3 ms·
Rabbitmq or redis will already be in apt or yum so a simple sudo apt-get install rabbitmq-server # or redis pip install celery You are ready to use their
by oneweekwonder 9y ago
Rabbitmq or redis will already be in apt or yum so a simple
sudo apt-get install rabbitmq-server # or redis
pip install celery
You are ready to use their example[0]
from celery import Celery
app = Celery('tasks', broker='pyamqp://guest@localhost//')
@app.task
def add(x, y):
return x + y
The idea of a mq might feel over-engineered. But the deployment and use is actually straight forward.
[0]: http://docs.celeryproject.org/en/latest/getting-started/first-steps-with-celery.html#application http://docs.celeryproject.org/en/latest/getting-started/firs...