]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Stop using deprecated timeutils.total_seconds()
authorJulien Danjou <julien@danjou.info>
Fri, 27 Nov 2015 08:54:33 +0000 (09:54 +0100)
committerJulien Danjou <julien@danjou.info>
Fri, 27 Nov 2015 08:54:33 +0000 (09:54 +0100)
This function has been deprecated. It was only useful for Python <= 2.6.

Change-Id: Ic0ca83920e9ed0692277bf5d903d3df91d1adcde

neutron/db/agentschedulers_db.py

index 1bc04bd63c7c95c88495defbe319f2b7415e0570..6c1e3658b806badc2a0efcf095887441b7d28f13 100644 (file)
@@ -142,7 +142,7 @@ class AgentSchedulerDbMixin(agents_db.AgentDbMixin):
         # detected, sleep for a while to let the agents check in.
         tdelta = timeutils.utcnow() - getattr(self, '_clock_jump_canary',
                                               timeutils.utcnow())
-        if timeutils.total_seconds(tdelta) > cfg.CONF.agent_down_time:
+        if tdelta.total_seconds() > cfg.CONF.agent_down_time:
             LOG.warn(_LW("Time since last %s agent reschedule check has "
                          "exceeded the interval between checks. Waiting "
                          "before check to allow agents to send a heartbeat "