Merge "Pass configration of what tasks are enabled"

This commit is contained in:
Jenkins 2015-07-14 19:23:29 +00:00 committed by Gerrit Code Review
commit a2921e7f96
2 changed files with 3 additions and 2 deletions

View File

@ -32,7 +32,7 @@ class TaskTest(TestCase):
def _enable_tasks(self, tasks):
self.config(
enabled_tasks=",".join(tasks),
enabled_tasks=tasks,
group="service:zone_manager")

View File

@ -43,7 +43,8 @@ class Service(coordination.CoordinationMixin, service.Service):
self._partitioner.start()
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)
# Instantiate the task