| 123456789101112131415161718192021222324252627282930313233343536373839404142 | """myapp.pyUsage::   (window1)$ python myapp.py worker -l info   (window2)$ python   >>> from myapp import add   >>> add.delay(16, 16).get()   32You can also specify the app to use with the `celery` command,using the `-A` / `--app` option::    $ celery -A myapp worker -l infoWith the `-A myproj` argument the program will search for an appinstance in the module ``myproj``.  You can also specify an explicitname using the fully qualified form::    $ celery -A myapp:app worker -l info"""from __future__ import absolute_import, unicode_literalsfrom celery import Celeryapp = Celery(    'myapp',    broker='amqp://guest@localhost//',    # ## add result backend here if needed.    # backend='rpc')@app.taskdef add(x, y):    return x + yif __name__ == '__main__':    app.start()
 |