Mercurial > public > sg101
diff gpp/antispam/rate_limit.py @ 578:a18516692273
Correct my Redis API error in unit test.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 05 May 2012 14:49:42 -0500 |
parents | 6a265b5768ca |
children |
line wrap: on
line diff
--- a/gpp/antispam/rate_limit.py Sat May 05 14:18:56 2012 -0500 +++ b/gpp/antispam/rate_limit.py Sat May 05 14:49:42 2012 -0500 @@ -62,7 +62,7 @@ conn = _get_connection() try: - conn.setex(key, count, _to_seconds(interval)) + conn.setex(key, time=_to_seconds(interval), value=count) except redis.RedisError, e: logger.error("rate limit (block_ip): %s" % e) raise RateLimiterUnavailable