Browse Source

Raise NotImplementedError for forget() with AMQP

Christoph Burgmer 14 năm trước cách đây
mục cha
commit
9b575d9197
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  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"]