Merge "Run periodic_task in a with a dynamic timer"
This commit is contained in:
commit
fadfa2fd80
@ -49,8 +49,9 @@ class PeriodicService(rpc_service.Service, periodic_task.PeriodicTasks):
|
|||||||
def start(self):
|
def start(self):
|
||||||
super(PeriodicService, self).start()
|
super(PeriodicService, self).start()
|
||||||
admin_context = context.RequestContext('admin', 'admin', is_admin=True)
|
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,
|
self.manager.periodic_tasks,
|
||||||
|
periodic_interval_max=cfg.CONF.periodic_interval,
|
||||||
context=admin_context)
|
context=admin_context)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user