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