leporo / tornado-redis

Asynchronous Redis client that works within Tornado IO loop.
666 stars 162 forks source link

Script commands #69

Closed jettify closed 6 years ago

jettify commented 10 years ago

I've fixed script commands and added tests. Please review.

Is it possible to have ResponseError risen, if lua script fails? Currently, yield gen.Task(self.client.eval, script) returns ResponseError object. Looks like following line is responsible for this: https://github.com/leporo/tornado-redis/blob/master/tornadoredis/client.py#L487 There are even tests, to ensure this behavior: https://github.com/leporo/tornado-redis/blob/d0caac2a99fe052a585a8367cc2961f5cb113c93/tornadoredis/tests/test_leaks.py#L25-L26

update: I had to increase timeout for async tests because _scriptkill command kills _lua_s infinite loop in 5.005sec ...