From 932cfa23b74231cf8bcc573e175e80d2c6369504 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 4 Nov 2019 12:59:12 -0600 Subject: [PATCH] mgr/orchestrator: add invalidate() to OutdatableDictMixin Signed-off-by: Sage Weil --- src/pybind/mgr/orchestrator.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pybind/mgr/orchestrator.py b/src/pybind/mgr/orchestrator.py index 1fa5427d54c..03923aefd6a 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 -- 2.39.5