In [1]:
from celery import Celery

In [4]:
app = Celery(main='romanesco', backend='amqp', broker='amqp://guest:guest@localhost:5672//')

In [5]:
sys.path


Out[5]:
['',
 '/home/safuser/miniconda/lib/python27.zip',
 '/home/safuser/miniconda/lib/python2.7',
 '/home/safuser/miniconda/lib/python2.7/plat-linux2',
 '/home/safuser/miniconda/lib/python2.7/lib-tk',
 '/home/safuser/miniconda/lib/python2.7/lib-old',
 '/home/safuser/miniconda/lib/python2.7/lib-dynload',
 '/home/safuser/miniconda/lib/python2.7/site-packages/runipy-0.1.0-py2.7.egg',
 '/home/safuser/miniconda/lib/python2.7/site-packages/setuptools-3.6-py2.7.egg',
 '/home/safuser/miniconda/lib/python2.7/site-packages',
 '/home/safuser/miniconda/lib/python2.7/site-packages/PIL',
 '/home/safuser/miniconda/lib/python2.7/site-packages/IPython/extensions',
 '/home/safuser/apps/girder',
 '/home/safuser/apps/girder/clients/python',
 '/home/safuser/apps/girder/plugins',
 '/home/safuser/apps/girder/plugins/romanesco']

In [6]:
sys.path.append('/home/safuser/apps/proletariat/')

In [7]:
from tasks import *

In [8]:
add_task = add.delay(4, 4)

In [9]:
add_task.get()


Out[9]:
8

In [10]:
print add_task.status
print add_task.state


SUCCESS
SUCCESS

In [11]:
b = excarb.delay(key2='value2')

In [12]:
b.get()


Out[12]:
{'kwargs': {'key2': 'value2'},
 'syspath': ['/home/safuser/miniconda/bin',
  '/home/safuser/apps/proletariat/$PYTHONPATH',
  '/home/safuser/apps/girder',
  '/home/safuser/miniconda/lib/python27.zip',
  '/home/safuser/miniconda/lib/python2.7',
  '/home/safuser/miniconda/lib/python2.7/plat-linux2',
  '/home/safuser/miniconda/lib/python2.7/lib-tk',
  '/home/safuser/miniconda/lib/python2.7/lib-old',
  '/home/safuser/miniconda/lib/python2.7/lib-dynload',
  '/home/safuser/miniconda/lib/python2.7/site-packages/runipy-0.1.0-py2.7.egg',
  '/home/safuser/miniconda/lib/python2.7/site-packages/setuptools-3.6-py2.7.egg',
  '/home/safuser/miniconda/lib/python2.7/site-packages',
  '/home/safuser/miniconda/lib/python2.7/site-packages/PIL']}

In [ ]: