tornadoredis でパイプラインを処理する適切な方法は何ですか? ドキュメントは明確ではありません。tornadoredis ライブラリを使用しています。
import tornadoredis
@tornado.web.asynchronous
@tornado.gen.engine
def get(self):
self.pipe_threads = []
sw = stopwatch.Timer()
if not self.get_cookie('rtbhui'):
self.cookie_id=str(uuid4())
self.set_cookie('test', self.cookie_id, domain='rtb.rtbhui.com',expires_days=365*2)
else:
self.cookie_id = self.get_cookie('test')
t = yield tornado.gen.Task(c.pipeline)
yield tornado.gen.Task(t.set,'key', 'value')
yield tornado.gen.Task(t.execute)
starting
ERROR:root:Uncaught exception GET /apixel?bid=eydhdmlkJzogJ2luZm9AYWRtYWdpYy5jby5qcCcsICdjcmlkJzogJzIwNzY3MDczNTE1JywgJ21hYmlkJzogeydub2RlJzogTm9uZSwgJ2hvZCc6ICcxMycsICdjaWQnOiAnMzYnLCAnaW5kdXN0cnknOiBOb25lLCAnZXgnOiAnMScsICd2aWQxJzogJzI5JywgJ2Rvdyc6ICczJ30sICdwcmlkJzogeydob2QnOiAnMTMnLCAnd295JzogJzE4JywgJ2NpZCc6ICczNicsICdkb3cnOiAnMycsICdzc3AnOiAnYWR4JywgJ3N0JzogTm9uZSwgJ2J0JzogJ2ZpcmVmb3gnLCAnY3R5JzogJ3Rva3lvJywgJ2V4JzogJzEnLCAndmlkMic6ICcyMjInLCAnZHQnOiAnMScsICdvcyc6ICdtYWMnLCAndmlkMSc6ICcyOSd9LCAnYWdpZCc6ICc0NTQ3OTE3Nzk1JywgJ2Nvb2tpZWlkJzogJ3JldGFnZXRpbmc6Y29va2llJywgJ2RpZCc6ICd5YWhvby5jb20nLCAndmFsaWRhdGlvbic6IFRydWV9 (127.0.0.1)
HTTPRequest(protocol='http', host='127.0.0.1:8055', method='GET', uri='/apixel?bid=eydhdmlkJzogJ2luZm9AYWRtYWdpYy5jby5qcCcsICdjcmlkJzogJzIwNzY3MDczNTE1JywgJ21hYmlkJzogeydub2RlJzogTm9uZSwgJ2hvZCc6ICcxMycsICdjaWQnOiAnMzYnLCAnaW5kdXN0cnknOiBOb25lLCAnZXgnOiAnMScsICd2aWQxJzogJzI5JywgJ2Rvdyc6ICczJ30sICdwcmlkJzogeydob2QnOiAnMTMnLCAnd295JzogJzE4JywgJ2NpZCc6ICczNicsICdkb3cnOiAnMycsICdzc3AnOiAnYWR4JywgJ3N0JzogTm9uZSwgJ2J0JzogJ2ZpcmVmb3gnLCAnY3R5JzogJ3Rva3lvJywgJ2V4JzogJzEnLCAndmlkMic6ICcyMjInLCAnZHQnOiAnMScsICdvcyc6ICdtYWMnLCAndmlkMSc6ICcyOSd9LCAnYWdpZCc6ICc0NTQ3OTE3Nzk1JywgJ2Nvb2tpZWlkJzogJ3JldGFnZXRpbmc6Y29va2llJywgJ2RpZCc6ICd5YWhvby5jb20nLCAndmFsaWRhdGlvbic6IFRydWV9', version='HTTP/1.1', remote_ip='127.0.0.1', body='', headers={'Connection': 'keep-alive', 'Accept-Language': 'en-us,en;q=0.5', 'Accept-Encoding': 'gzip, deflate', 'Cache-Control': 'max-age=0', 'Host': '127.0.0.1:8055', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0'})
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/tornado-2.2.1-py2.7.egg/tornado/web.py", line 1074, in wrapper
return method(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/tornado-2.2.1-py2.7.egg/tornado/gen.py", line 107, in wrapper
runner.run()
File "/usr/local/lib/python2.7/dist-packages/tornado-2.2.1-py2.7.egg/tornado/gen.py", line 319, in run
yielded = self.gen.throw(*exc_info)
File "/home/ubuntu/workspace/rtbopsConfig/rtbServers/rtbTornadoServer/tornadoServer.py", line 81, in get
t = yield tornado.gen.Task(c.pipeline)
File "/usr/local/lib/python2.7/dist-packages/tornado-2.2.1-py2.7.egg/tornado/gen.py", line 341, in run
self.yield_point.start(self)
File "/usr/local/lib/python2.7/dist-packages/tornado-2.2.1-py2.7.egg/tornado/gen.py", line 223, in start
self.func(*self.args, **self.kwargs)
TypeError: pipeline() got an unexpected keyword argument 'callback'
ERROR:root:500 GET /apixel?bid=eydhdmlkJzogJ2luZm9AYWRtYWdpYy5jby5qcCcsICdjcmlkJzogJzIwNzY3MDczNTE1JywgJ21hYmlkJzogeydub2RlJzogTm9uZSwgJ2hvZCc6ICcxMycsICdjaWQnOiAnMzYnLCAnaW5kdXN0cnknOiBOb25lLCAnZXgnOiAnMScsICd2aWQxJzogJzI5JywgJ2Rvdyc6ICczJ30sICdwcmlkJzogeydob2QnOiAnMTMnLCAnd295JzogJzE4JywgJ2NpZCc6ICczNicsICdkb3cnOiAnMycsICdzc3AnOiAnYWR4JywgJ3N0JzogTm9uZSwgJ2J0JzogJ2ZpcmVmb3gnLCAnY3R5JzogJ3Rva3lvJywgJ2V4JzogJzEnLCAndmlkMic6ICcyMjInLCAnZHQnOiAnMScsICdvcyc6ICdtYWMnLCAndmlkMSc6ICcyOSd9LCAnYWdpZCc6ICc0NTQ3OTE3Nzk1JywgJ2Nvb2tpZWlkJzogJ3JldGFnZXRpbmc6Y29va2llJywgJ2RpZCc6ICd5YWhvby5jb20nLCAndmFsaWRhdGlvbic6IFRydWV9 (127.0.0.1) 6.69ms