Testing the installation

Let's try a quick example to make sure that our Celery installation is working. We will need four terminal windows on, ideally, three different machines (again, we will call them HOST1, HOST2, HOST3, and HOST4). We will start RabbitMQ in one window on HOST1, as shown in the following command (make sure that you use the correct path to rabbitmq-server):

HOST1 $ sudo /usr/local/sbin/rabbitmq-server

In another terminal window (on HOST2), start Redis (if you did not install it, skip to the next paragraph) as follows (make sure to use the correct path to redis-server):

HOST2 $ sudo /usr/local/bin/redis-server

Finally, in a third window (HOST3), create the following Python script (always remember to activate our virtual environment ...

Get Distributed Computing with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.