diff options
author | Rick Harris <rconradharris@gmail.com> | 2013-10-04 16:32:43 +0000 |
---|---|---|
committer | Rick Harris <rconradharris@gmail.com> | 2013-10-04 17:28:31 +0000 |
commit | 82f8c8ce70248418b831ed46140fcea5e3e88451 (patch) | |
tree | 17f2ef973fe21049afe9c8db5a3d7c32c62216c5 /nova/servicegroup/drivers | |
parent | e5fc28adda4b95325f74402fe63ea969e816e6c3 (diff) | |
download | nova-82f8c8ce70248418b831ed46140fcea5e3e88451.tar.gz |
Remove `utils.total_seconds`
The one place this was used would be better written using
`timeutils.delta_seconds`.
Change-Id: I601c23245149ca1bd9bbf5927a2458a6a1c21dbe
Diffstat (limited to 'nova/servicegroup/drivers')
-rw-r--r-- | nova/servicegroup/drivers/db.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/nova/servicegroup/drivers/db.py b/nova/servicegroup/drivers/db.py index 5a0869dbba..d901f5dbfb 100644 --- a/nova/servicegroup/drivers/db.py +++ b/nova/servicegroup/drivers/db.py @@ -21,7 +21,6 @@ from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import timeutils from nova.servicegroup import api -from nova import utils CONF = cfg.CONF @@ -66,7 +65,7 @@ class DbDriver(api.ServiceGroupDriver): # below does not (and will fail) last_heartbeat = last_heartbeat.replace(tzinfo=None) # Timestamps in DB are UTC. - elapsed = utils.total_seconds(timeutils.utcnow() - last_heartbeat) + elapsed = timeutils.delta_seconds(last_heartbeat, timeutils.utcnow()) LOG.debug('DB_Driver.is_up last_heartbeat = %(lhb)s elapsed = %(el)s', {'lhb': str(last_heartbeat), 'el': str(elapsed)}) return abs(elapsed) <= CONF.service_down_time |