On Tue, Feb 11, 2014 at 12:28 AM, James Tyra <[email protected]> wrote: > Mainly because I've never heard of celery before you mentioned it. > > Could you provide us an example of how to integrate celery with web.py ?
Sure, check this out: https://bitbucket.org/iamFIREcracker/expensio/src/05b412ac73a111dd5004d175bc9a6c7695001aa0/?at=develop Long story short: - Add celery as project dependency - Install redis -- that will be used as celery backend - Create a configuration file -- https://bitbucket.org/iamFIREcracker/expensio/src/05b412ac73a111dd5004d175bc9a6c7695001aa0/celeryconfig.py?at=develop - Initialize the framework -- https://bitbucket.org/iamFIREcracker/expensio/src/05b412ac73a111dd5004d175bc9a6c7695001aa0/app/celery.py?at=develop - Register some tasks -- https://bitbucket.org/iamFIREcracker/expensio/src/05b412ac73a111dd5004d175bc9a6c7695001aa0/app/tasks.py?at=develop - Use the tasks in the handlers -- https://bitbucket.org/iamFIREcracker/expensio/src/05b412ac73a111dd5004d175bc9a6c7695001aa0/app/controllers/expenses.py?at=develop#cl-208 and https://bitbucket.org/iamFIREcracker/expensio/src/05b412ac73a111dd5004d175bc9a6c7695001aa0/app/controllers/expenses.py?at=develop#cl-223 That's all -- kind of. Ciao, Matteo -- You received this message because you are subscribed to the Google Groups "web.py" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/webpy. For more options, visit https://groups.google.com/groups/opt_out.
