MCPcopy Create free account
hub / github.com/StackStorm/st2 / register_configs

Function register_configs

st2common/st2common/content/bootstrap.py:372–395  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

370
371
372def register_configs():
373 pack_dir = cfg.CONF.register.pack
374 fail_on_failure = not cfg.CONF.register.no_fail_on_failure
375
376 registered_count = 0
377
378 try:
379 LOG.info("=========================================================")
380 LOG.info("############## Registering configs ######################")
381 LOG.info("=========================================================")
382 with Timer(key="st2.register.configs"):
383 registered_count = configs_registrar.register_configs(
384 pack_dir=pack_dir,
385 fail_on_failure=fail_on_failure,
386 validate_configs=True,
387 )
388 except Exception as e:
389 exc_info = not fail_on_failure
390 LOG.warning("Failed to register configs: %s", e, exc_info=exc_info)
391
392 if fail_on_failure:
393 raise e
394
395 LOG.info("Registered %s configs." % (registered_count))
396
397
398def register_content():

Callers 1

register_contentFunction · 0.70

Calls 1

TimerClass · 0.90

Tested by

no test coverage detected