Thank you very much for your reply Itamar. I have switched to txredisapi which is non-blocking library and my problem was solved.<br><br><div class="gmail_quote">2012/9/29 Itamar Turner-Trauring <span dir="ltr"><<a href="mailto:itamar@futurefoundries.com" target="_blank">itamar@futurefoundries.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">One problem in the code: it kinda seems you want to receive lines, but you're
overriding dataReceived instead of lineReceived in RedisWorkProtocol. At the very minimum you shouldn't assume dataReceived is called with the exact bytes that were written on the other side.<br><br>More importantly, I assume redis-py is blocking. Calling a blocking API from Twisted will block the reactor, preventing any other code from running until it the API call returns. As such it means you can't have two queries to redis running at the same time, unless you use something like deferToThread, or a redis client that supports Twisted directly.<span class="HOEnZb"><font color="#888888"><br>
<br>-- <br>Itamar Turner-Trauring, Future Foundries LLC<br><a href="http://futurefoundries.com/" target="_blank">http://futurefoundries.com/</a> — Twisted consulting, training and support.<br><br>
</font></span><br>_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
<br></blockquote></div><br>