Redis の一部を除くすべてのキーを削除しようとしていますが、次の例外が発生します。
... File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twisted/protocols/basic.py", line 572, in dataReceived
return self.rawDataReceived(data)
File "build/bdist.macosx-10.6-intel/egg/txredisapi/protocol.py", line 184, in rawDataReceived
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twisted/protocols/basic.py", line 589, in setLineMode
return self.dataReceived(extra)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twisted/protocols/basic.py", line 564, in dataReceived
why = self.lineReceived(line)
File "build/bdist.macosx-10.6-intel/egg/txredisapi/protocol.py", line 134, in lineReceived
exceptions.RuntimeError: maximum recursion depth exceeded
コードは次のとおりです。
@defer.inlineCallbacks
def resetAll(self):
dict=yield self.factory.conn.keys()
for xyz in dict:
if xyz<>"game" and xyz<>"people" and xyz<>"said":
val = yield self.factory.conn.delete(xyz)
# ...
if __name__ == '__main__':
from twisted.internet import reactor
conn = txredisapi.lazyRedisConnectionPool(reconnect = True)
factory = STSFactory(conn)
factory.clients = []
print "Server started"
reactor.listenTCP(11000,factory)
reactor.listenTCP(11001,factory)
reactor.listenTCP(11002,factory)
reactor.run()
Redis で約 725 個のキーを使用して resetAll 関数を呼び出すと、例外が発生しました。200 などの低い数値では起動されません。誰が何が起こっているのか考えていますか? ありがとう。