Browse Source

Merge "Fix task_flow.max_workers with persistence in amphorav2" into stable/wallaby

stable/wallaby
Zuul 2 weeks ago
committed by Gerrit Code Review
parent
commit
7afe043a74
2 changed files with 9 additions and 2 deletions
  1. +4
    -1
      octavia/common/base_taskflow.py
  2. +5
    -1
      octavia/tests/unit/common/test_base_taskflow.py

+ 4
- 1
octavia/common/base_taskflow.py View File

@ -165,7 +165,10 @@ class TaskFlowServiceController(object):
'redis_taskflow_driver'):
conductor = RedisDynamicLoggingConductor(
name, board, persistence=persistence,
engine=CONF.task_flow.engine)
engine=CONF.task_flow.engine,
engine_options={
'max_workers': CONF.task_flow.max_workers
})
board.claim = functools.partial(
board.claim,
expiry=CONF.task_flow.jobboard_expiration_time)


+ 5
- 1
octavia/tests/unit/common/test_base_taskflow.py View File

@ -75,6 +75,7 @@ class TestTaskFlowServiceController(base.TestCase):
def setUp(self):
self.conf = oslo_fixture.Config(cfg.CONF)
self.conf.config(group="task_flow", engine='parallel')
self.conf.config(group="task_flow", max_workers=MAX_WORKERS)
self.driver_mock = mock.MagicMock()
self.persistence_mock = mock.MagicMock()
self.jobboard_mock = mock.MagicMock()
@ -140,7 +141,10 @@ class TestTaskFlowServiceController(base.TestCase):
rediscond.assert_called_once_with(
"test", self.jobboard_mock.__enter__(),
persistence=self.persistence_mock.__enter__(),
engine='parallel')
engine='parallel',
engine_options={
'max_workers': MAX_WORKERS,
})
self.conf.config(group="task_flow",
jobboard_backend_driver='zookeeper_taskflow_driver')


Loading…
Cancel
Save