瀏覽代碼

Self was sent to a method (doh) in the tyrant and cache backends.

Ask Solem 16 年之前
父節點
當前提交
8043521852
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. 2 2
      celery/backends/cache.py
  2. 2 2
      celery/backends/tyrant.py

+ 2 - 2
celery/backends/cache.py

@@ -28,11 +28,11 @@ class Backend(BaseBackend):
 
     def get_status(self, task_id):
         """Get the status of a task."""
-        return self._get_task_meta_for(self, task_id)["status"]
+        return self._get_task_meta_for(task_id)["status"]
 
     def get_result(self, task_id):
         """Get the result of a task."""
-        meta = self._get_task_meta_for(self, task_id)
+        meta = self._get_task_meta_for(task_id)
         if meta["status"] == "FAILURE":
             return self.exception_to_python(meta["result"])
         else:

+ 2 - 2
celery/backends/tyrant.py

@@ -68,11 +68,11 @@ class Backend(BaseBackend):
 
     def get_status(self, task_id):
         """Get the status for a task."""
-        return self._get_task_meta_for(self, task_id)["status"]
+        return self._get_task_meta_for(task_id)["status"]
 
     def get_result(self, task_id):
         """Get the result of a task."""
-        meta = self._get_task_meta_for(self, task_id)
+        meta = self._get_task_meta_for(task_id)
         if meta["status"] == "FAILURE":
             return self.exception_to_python(meta["result"])
         else: