diff options
author | Michael Still <mikal@stillhq.com> | 2013-04-09 13:25:38 +1000 |
---|---|---|
committer | Michael Still <mikal@stillhq.com> | 2013-04-16 04:24:48 +1000 |
commit | 8c53d87ad98f9b7a3ed6d4c83a6f0f62969fa64c (patch) | |
tree | 10b41290f547b4f1f3d6a8dc27c54fe862b74483 /nova/service.py | |
parent | 36b10384724fec9657784980cd2bd38e72b445bc (diff) | |
download | nova-8c53d87ad98f9b7a3ed6d4c83a6f0f62969fa64c.tar.gz nova-8c53d87ad98f9b7a3ed6d4c83a6f0f62969fa64c.tar.xz nova-8c53d87ad98f9b7a3ed6d4c83a6f0f62969fa64c.zip |
Import and convert to oslo loopingcall.
Import the oslo looping call implementation (which is a copy of
nova's), delete nova's local copy, convert all users to the new
location.
It should be noted that the oslo implementation of
FixedIntervalLoopingCall measures time from the start of the
periodic task, not the end, so periodic tasks will run with a
constant frequency instead of the frequency changing depending on
how long the periodic task takes to run.
Change-Id: Ia62ce1988f5373c09146efa6b3b1d1dc094d50c4
Diffstat (limited to 'nova/service.py')
-rw-r--r-- | nova/service.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nova/service.py b/nova/service.py index 0aa66310a..7cb0e2212 100644 --- a/nova/service.py +++ b/nova/service.py @@ -37,6 +37,7 @@ from nova import exception from nova.openstack.common import eventlet_backdoor from nova.openstack.common import importutils from nova.openstack.common import log as logging +from nova.openstack.common import loopingcall from nova.openstack.common import rpc from nova import servicegroup from nova import utils @@ -473,7 +474,7 @@ class Service(object): else: initial_delay = None - periodic = utils.DynamicLoopingCall(self.periodic_tasks) + periodic = loopingcall.DynamicLoopingCall(self.periodic_tasks) periodic.start(initial_delay=initial_delay, periodic_interval_max=self.periodic_interval_max) self.timers.append(periodic) |