Merge "Change default for [kafka]num_processors to 1"

This commit is contained in:
Zuul 2019-01-31 19:19:01 +00:00 committed by Gerrit Code Review
commit 1be67d365c
2 changed files with 5 additions and 1 deletions

View File

@ -42,7 +42,7 @@ kafka_common_opts = [
default=32768),
cfg.IntOpt('num_processors',
help='Number of processes spawned by persister',
default=0)
default=1)
]
kafka_common_group = cfg.OptGroup(name='kafka',

View File

@ -102,6 +102,10 @@ def prepare_processes(conf, repo_driver):
for proc in range(0, conf.num_processors):
processors.append(multiprocessing.Process(
target=start_process, args=(repository, conf)))
else:
LOG.warning("Number of processors (num_processors) is {}".format(
conf.num_processors))
def main():
"""Start persister."""