Explorar el Código

Convert unicode string to str to fix cache test

Vitaly Babiy hace 16 años
padre
commit
0350e464c7
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      celery/backends/base.py

+ 1 - 1
celery/backends/base.py

@@ -249,7 +249,7 @@ class KeyValueStoreBackend(BaseBackend):
         meta = self.get(self.get_cache_key_for_task(task_id))
         if not meta:
             return {"status": "PENDING", "result": None}
-        meta = pickle.loads(meta)
+        meta = pickle.loads(str(meta)) # Not complete sure if this is correct, but tests pass -vbabiy
         if meta.get("status") == "DONE":
             self._cache[task_id] = meta
         return meta