Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Example #27

Closed
carlskii opened this Issue · 9 comments

2 participants

@carlskii

Hi,

Sorry ignore my previous question - I've worked out whats happening in the example. Could you explain though the tornado_ioloop.py part and how that compares with the tornado_async.py component?

Regards.

@mher
Owner
$ cd tornado-celery

Launch celery worker:

$ celery worker --app=examples.tasks -l info

Launch tornado-celery http server:

$ python -m tcelery --port=8888 --app=examples.tasks

And finally execute tasks:

$ curl -X POST -d '{"args":[1,2]}' http://localhost:8888/apply/examples.tasks.add/
@mher
Owner

tornado_ioloop.py shows how to use io loop to execute tasks without a web server.

@carlskii

Perfect thanks!!!

@carlskii carlskii closed this
@carlskii carlskii reopened this
@carlskii

Where does the the URL "apply/examples.tasks.add/" get defined in this example. I can't see any reference in the code to a URL that includes "apply"?

@carlskii

Arr, I see now. So if I wanted to add tornado-celery to an existing tornado app, is there an example for this?

@mher
Owner

examples/tornado_*.py

@carlskii

Excellent thanks!

Any chance you can provide description for each of the URL within tornado-celery/handlers.py. I've got the basic example you provided earlier working but I'm curious about the /apply-async/, /tasks/result/ and /tasks/revoke/ routes.

@mher
Owner

Please open a feature request. I'll document them later.

@mher mher closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.