In /src/typhoonae/taskqueue/worker.py, near line 90 change:
req = urllib2.Request(
url='http://%(host)s:%(port)s%(url)s' % task,
data=base64.b64decode(task['payload']),
headers=headers
)
by:
req = RequestWithMethod(
method=task['method'],
url='http://%(host)s:%(port)s%(url)s' % task,
data=base64.b64decode(task['payload']),
headers=headers
)
and at line 77 add:
class RequestWithMethod(urllib2.Request):
def __init__(self, method, *args, **kwargs):
self._method = method
urllib2.Request.__init__(self, *args, **kwargs)
def get_method(self):
return self._method
And change line 157 from:
method=add_request.method()
to:
method=add_request.RequestMethod_Name(add_request.method())
Cheers,
> --
> You received this message because you are subscribed to the Google
> Groups "typhoonae" group.
> To post to this group, send email to typh...@googlegroups.com
> To unsubscribe from this group, send email to
> typhoonae+...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/typhoonae?hl=en
--
Joaquin Cuenca Abela
I have merged the support of celery tasks here:
If you like the code please merge it in your tree. I based these
changes on typhoonae before the change you just made, so maybe it will
be easier to rollback the last change you made and pull my changes.
What this patch adds is:
- workers managed by celery. So you can have several workers on
several servers (ie you can scale the workers).
- deferred tasks managed by the same workers.
- support for rate_limit.
Note that bucket_size is still not supported.
it's the first time I work with buildout, so probably I made something
stupid. Please Tobias let me know if I screwed it up.
Cheers,