From: Sage Weil Date: Mon, 4 Nov 2019 18:59:12 +0000 (-0600) Subject: mgr/orchestrator: add invalidate() to OutdatableDictMixin X-Git-Tag: v15.1.0~1020^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=932cfa23b74231cf8bcc573e175e80d2c6369504;p=ceph.git mgr/orchestrator: add invalidate() to OutdatableDictMixin Signed-off-by: Sage Weil --- diff --git a/src/pybind/mgr/orchestrator.py b/src/pybind/mgr/orchestrator.py index 1fa5427d54c5..03923aefd6ac 100644 --- a/src/pybind/mgr/orchestrator.py +++ b/src/pybind/mgr/orchestrator.py @@ -1166,6 +1166,10 @@ class OutdatableDictMixin(object): for o in outdated: del self[o] + def invalidate(self, key): + self[key] = OutdatableData(self[key].data, + datetime.datetime.fromtimestamp(0)) + class OutdatablePersistentDict(OutdatableDictMixin, PersistentStoreDict): pass