/celery-examples

Examples of distributed computation using Celery

Primary LanguagePythonBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

This is a small and extremely lightweight demo of using Celery for distributed computation.


Required packages:

    celery (http://celeryproject.org/)
        This example was tested with version 2.3.1

Other requirements:

    RabbitMQ
        This example was tested with version 2.6.1
    
    Several RabbitMQ server installation packages are also available here:
    http://www.rabbitmq.com/server.html

    You will need to run the following commands to configure RabbitMQ:
        $ sudo rabbitmqctl add_user celeryuser celery
        $ sudo rabbitmqctl add_vhost celeryvhost
        $ sudo rabbitmqctl set_permissions -p celeryvhost celeryuser ".*" ".*" ".*"
    (Note: the user/password configuration here must match celeryconfig.py.)

    Starting RabbitMQ:
        $ sudo rabbitmq-server

To run the demo:

    - start rabbitmq-server
    - cd into the directory containing celeryconfig.py
    - launch celery daemon: $ celeryd
    - in a separate terminal (in the same dir): $ python demo.py