## page was renamed from Celery
= Celery =
Celery is an asynchronous task queue/job queue based on distributed message passing.	

http://docs.celeryproject.org/en/latest/getting-started/first-steps-with-celery.html

== Slackware 14 installation ==
 * easy_install celery
 * pip install celery

Check installation: 
{{{#!highlight bash
python
Python 2.7.3 (default, Jul  3 2012, 19:58:39) 
[GCC 4.7.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import celery
>>> celery.__version__
'3.1.7'
>>>
}}}

== Test app with Redis ==
Run redis:
{{{#!highlight bash
$redis-server & 
$redis-cli     
redis 127.0.0.1:6379> quit
}}}

App:
{{{#!highlight python
# celeryTest.py
from celery import Celery

app = Celery('tasks', broker='redis://localhost')
app.conf.update(CELERY_RESULT_BACKEND="redis://")

@app.task
def add(x, y):
    return x + y
}}}

{{{#!highlight bash
$celery -A celeryTest worker --loglevel=info
}}}

Run task
{{{#!highlight bash
$ python
Python 2.7.3 (default, Jul  3 2012, 19:58:39) 
[GCC 4.7.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from celeryTest import add
>>> xx=add.delay(3,3)
>>> xx.ready()
True
>>> print(xx.result)
6
}}}