INNER CODE UNIT · Python
_terminate_one_execution
flyteorg/flytekit · flytekit/clis/flyte_cli/main.py:246
def _terminate_one_execution(client, urn, cause, shouldPrint=True):
if shouldPrint:
click.echo("{:100} {:40}".format(_tt(urn), _tt(cause)))
client.terminate_execution(cli_identifiers.WorkflowExecutionIdentifier.from_python_std(urn), cause)
def _update_one_launch_plan(client: _friendly_client.SynchronousFlyteClient, urn, state):
if state == "active":
state = _launch_plan.LaunchPlanState.ACTIVE
else:
state = _launch_plan.LaunchPlanState.INACTIVE
client.update_launch_plan(cli_identifiers.Identifier.from_python_std(urn), state)
click.echo("Successfully updated {}".format(_tt(urn)))
def _render_schedule_expr(lp):
sched_expr = "NONE"
if lp.spec.entity_metadata.schedule and lp.spec.entity_metadata.schedule.cron_expression: