Merge "Run periodic_task in a with a dynamic timer"

This commit is contained in:
Jenkins 2014-03-25 23:27:30 +00:00 committed by Gerrit Code Review
commit fadfa2fd80

View File

@ -49,8 +49,9 @@ class PeriodicService(rpc_service.Service, periodic_task.PeriodicTasks):
def start(self):
super(PeriodicService, self).start()
admin_context = context.RequestContext('admin', 'admin', is_admin=True)
self.tg.add_timer(cfg.CONF.periodic_interval,
self.tg.add_dynamic_timer(
self.manager.periodic_tasks,
periodic_interval_max=cfg.CONF.periodic_interval,
context=admin_context)