Browse Source

Cache backend: expires must be an int, not float. Thanks to jonozzz

Ask Solem 14 years ago
parent
commit
57a6491c90
1 changed files with 1 additions and 1 deletions
  1. 1 1
      celery/backends/cache.py

+ 1 - 1
celery/backends/cache.py

@@ -56,7 +56,7 @@ class CacheBackend(KeyValueStoreBackend):
         super(CacheBackend, self).__init__(self, **kwargs)
         if isinstance(expires, timedelta):
             expires = timeutils.timedelta_seconds(expires)
-        self.expires = expires
+        self.expires = int(expires)
         self.options = dict(conf.CACHE_BACKEND_OPTIONS, **options)
         self.backend, _, servers = partition(backend, "://")
         self.servers = servers.split(";")