def restart_errors(name: str): for name_ in name.split(","): count = len( FlowItem.recreate_items(name, filter_statuses=Statuses.error_statuses)) typer.secho( f" {name_} {typer.style(f'{count=}', fg=typer.colors.WHITE)} OK")
def restart( name: str, from_time: dt.datetime = typer.Option(..., "--from_time", "-s"), to_time: dt.datetime = typer.Option(..., "--to_time", "-e"), ): for name_ in name.split(","): count = len( FlowItem.recreate_items(name, from_time=from_time, to_time=to_time)) typer.secho( f" {name_} {typer.style(f'{count=}', fg=typer.colors.WHITE)} OK")