浏览代码

Redis result backend: Expires cannot be 0. Closes #1661

Ask Solem 11 年之前
父节点
当前提交
7e76877362
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      celery/backends/redis.py

+ 1 - 1
celery/backends/redis.py

@@ -92,7 +92,7 @@ class RedisBackend(KeyValueStoreBackend):
 
     def set(self, key, value):
         client = self.client
-        if self.expires is not None:
+        if self.expires:
             client.setex(key, value, self.expires)
         else:
             client.set(key, value)