mirror of
https://github.com/ceph/ceph
synced 2024-12-25 12:54:16 +00:00
mgr/dashboard: fix error handling in remote_view_cache
Signed-off-by: John Spray <john.spray@redhat.com>
This commit is contained in:
parent
4296962edc
commit
f23c68f168
@ -22,13 +22,12 @@ class GetterThread(Thread):
|
||||
self._view.value = None
|
||||
self._view.value_when = None
|
||||
self._view.getter_thread = None
|
||||
self.event.set()
|
||||
|
||||
with self._view.lock:
|
||||
self._view.latency = t1 - t0
|
||||
self._view.value = val
|
||||
self._view.value_when = datetime.datetime.now()
|
||||
self._view.getter_thread = None
|
||||
else:
|
||||
with self._view.lock:
|
||||
self._view.latency = t1 - t0
|
||||
self._view.value = val
|
||||
self._view.value_when = datetime.datetime.now()
|
||||
self._view.getter_thread = None
|
||||
|
||||
self.event.set()
|
||||
|
||||
@ -133,4 +132,4 @@ class RemoteViewCache(object):
|
||||
pass
|
||||
|
||||
def _get(self):
|
||||
raise NotImplementedError()
|
||||
raise NotImplementedError()
|
||||
|
Loading…
Reference in New Issue
Block a user