Explorar o código

Raise NotImplementedError for forget() with AMQP

Christoph Burgmer %!s(int64=14) %!d(string=hai) anos
pai
achega
9b575d9197
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      celery/backends/base.py

+ 4 - 0
celery/backends/base.py

@@ -159,6 +159,10 @@ class BaseDictBackend(BaseBackend):
         self._cache.pop(task_id, None)
         self._forget(task_id)
 
+    def _forget(self, task_id):
+        raise NotImplementedError("%s does not implement forget." % (
+                    self.__class__))
+
     def get_status(self, task_id):
         """Get the status of a task."""
         return self.get_task_meta(task_id)["status"]