Merge "Pass configration of what tasks are enabled"
This commit is contained in:
commit
a2921e7f96
@ -32,7 +32,7 @@ class TaskTest(TestCase):
|
|||||||
|
|
||||||
def _enable_tasks(self, tasks):
|
def _enable_tasks(self, tasks):
|
||||||
self.config(
|
self.config(
|
||||||
enabled_tasks=",".join(tasks),
|
enabled_tasks=tasks,
|
||||||
group="service:zone_manager")
|
group="service:zone_manager")
|
||||||
|
|
||||||
|
|
||||||
|
@ -43,7 +43,8 @@ class Service(coordination.CoordinationMixin, service.Service):
|
|||||||
self._partitioner.start()
|
self._partitioner.start()
|
||||||
self._partitioner.watch_partition_change(self._rebalance)
|
self._partitioner.watch_partition_change(self._rebalance)
|
||||||
|
|
||||||
for task in tasks.PeriodicTask.get_extensions():
|
enabled = CONF['service:zone_manager'].enabled_tasks
|
||||||
|
for task in tasks.PeriodicTask.get_extensions(enabled):
|
||||||
LOG.debug("Registering task %s" % task)
|
LOG.debug("Registering task %s" % task)
|
||||||
|
|
||||||
# Instantiate the task
|
# Instantiate the task
|
||||||
|
Loading…
Reference in New Issue
Block a user