Merge "Set value by default will be equal to the number of CPUs available."

This commit is contained in:
Jenkins 2016-10-11 12:37:14 +00:00 committed by Gerrit Code Review
commit 3f0bdda71f
1 changed files with 4 additions and 4 deletions

View File

@ -80,11 +80,11 @@ socket_opts = [
]
eventlet_opts = [
cfg.IntOpt('workers', default=0,
cfg.IntOpt('workers', default=0, min=0,
help=_('The number of child process workers that will be '
'created to service requests. The default will be '
'equal to the number of CPUs available.')),
cfg.IntOpt('max_header_line', default=16384,
cfg.IntOpt('max_header_line', default=16384, min=0,
help=_('Maximum line size of message headers to be accepted. '
'max_header_line may need to be increased when using '
'large tokens (typically those generated by the '
@ -98,7 +98,7 @@ eventlet_opts = [
'read successfully by the client, you simply have to '
'set this option to False when you create a wsgi '
'server.')),
cfg.IntOpt('client_socket_timeout', default=900,
cfg.IntOpt('client_socket_timeout', default=900, min=0,
help=_('Timeout for client connections\' socket operations. '
'If an incoming connection is idle for this number of '
'seconds it will be closed. A value of \'0\' means '
@ -119,7 +119,7 @@ ASYNC_EVENTLET_THREAD_POOL_LIST = []
def get_num_workers():
"""Return the configured number of workers."""
if CONF.workers is None:
if not CONF.workers:
# None implies the number of CPUs
return processutils.get_worker_count()
return CONF.workers