Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"""
logger.debug("you asked to run pipeline: %s", pipeline_name)
logger.debug("you set the initial context to: %s", pipeline_context_input)
if context is None:
context = pypyr.context.Context()
context.pipeline_name = pipeline_name
context.working_dir = pypyr.moduleloader.get_working_directory()
# pipeline loading deliberately outside of try catch. The try catch will
# try to run a failure-handler from the pipeline, but if the pipeline
# doesn't exist there is no failure handler that can possibly run so this
# is very much a fatal stop error.
pipeline_definition = pipeline_cache.get_pipeline(
pipeline_name=pipeline_name,
loader=loader)
run_pipeline(
pipeline=pipeline_definition,
pipeline_context_input=pipeline_context_input,
context=context,
parse_input=parse_input,
groups=groups,
success_group=success_group,
failure_group=failure_group
)