Merge "Run periodic_task in a with a dynamic timer"
This commit is contained in:
commit
fadfa2fd80
@ -49,9 +49,10 @@ 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,
|
||||||
context=admin_context)
|
periodic_interval_max=cfg.CONF.periodic_interval,
|
||||||
|
context=admin_context)
|
||||||
|
|
||||||
|
|
||||||
def prepare_service(argv=[]):
|
def prepare_service(argv=[]):
|
||||||
|
Loading…
Reference in New Issue
Block a user