Fix the display of updated_at time when using memcache driver.

When using mc driver(set servicegroup_driver=mc), the service reports
state by memcache. but we use 'nova service-list' get the status of
services registered in nova, the 'update_at' time is not the last updated
time not as db driver. so we should get the time in memcache to update the
time in response.
Closes-Bug: #1647269

Change-Id: I1d4763436ad6de2483c39f5fe97fa6e8d283d8a3
This commit is contained in:
Tao Li
2016-12-23 10:35:01 +08:00
parent 1a643bf934
commit 0df91a7f79
8 changed files with 81 additions and 1 deletions

View File

@@ -78,3 +78,7 @@ class API(object):
return False
return self._driver.is_up(member)
def get_updated_time(self, member):
"""Get the updated time from drivers except db"""
return self._driver.updated_time(member)