Quellcode durchsuchen

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

Ask Solem vor 16 Jahren
Ursprung
Commit
8043521852
2 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen
  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: