Improve config options
Change-Id: I8f73a544333b02a4bc37736d850bf06cc09f8263
This commit is contained in:
parent
00885b42ff
commit
94b9d32ae6
|
@ -94,7 +94,7 @@ engine_opts = [
|
|||
cfg.IntOpt(
|
||||
'function_service_expiration',
|
||||
default=300,
|
||||
help='Maximum service time for function in orchestrator.'
|
||||
help='Maximum service time in seconds for function in orchestrator.'
|
||||
)
|
||||
]
|
||||
|
||||
|
@ -135,20 +135,9 @@ kubernetes_opts = [
|
|||
]
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
CLI_OPTS = [launch_opt]
|
||||
|
||||
CONF.register_opts(api_opts, group=API_GROUP)
|
||||
CONF.register_opts(pecan_opts, group=PECAN_GROUP)
|
||||
CONF.register_opts(engine_opts, group=ENGINE_GROUP)
|
||||
CONF.register_opts(storage_opts, group=STORAGE_GROUP)
|
||||
CONF.register_opts(kubernetes_opts, group=KUBERNETES_GROUP)
|
||||
CONF.register_cli_opts(CLI_OPTS)
|
||||
|
||||
default_group_opts = itertools.chain(
|
||||
CLI_OPTS,
|
||||
[]
|
||||
)
|
||||
default_group_opts = itertools.chain(CLI_OPTS, [])
|
||||
|
||||
|
||||
def list_opts():
|
||||
|
@ -162,6 +151,9 @@ def list_opts():
|
|||
]
|
||||
|
||||
|
||||
for group, options in list_opts():
|
||||
CONF.register_opts(list(options), group)
|
||||
|
||||
_DEFAULT_LOG_LEVELS = [
|
||||
'eventlet.wsgi.server=WARN',
|
||||
'oslo_service.periodic_task=INFO',
|
||||
|
@ -175,7 +167,6 @@ def parse_args(args=None, usage=None, default_config_files=None):
|
|||
default_log_levels = log.get_default_log_levels()
|
||||
default_log_levels.extend(_DEFAULT_LOG_LEVELS)
|
||||
log.set_defaults(default_log_levels=default_log_levels)
|
||||
|
||||
log.register_options(CONF)
|
||||
|
||||
CONF(
|
||||
|
|
|
@ -50,7 +50,7 @@ def handle_function_service_expiration(ctx, engine_client, orchestrator):
|
|||
function_id={'in': expiry_ids}
|
||||
)
|
||||
|
||||
LOG.info('Found total expiry function mapping numbers: %s', len(mappings))
|
||||
LOG.info('Found %s total expiry function mappings', len(mappings))
|
||||
|
||||
with db_api.transaction():
|
||||
for m in mappings:
|
||||
|
|
Loading…
Reference in New Issue