Exemplo n.º 1
0
def flowitem_model():
    from flowmaster.models import FlowItem

    FlowItem.name_for_test = "__fm_test__"
    FlowItem.clear("__fm_test__")

    return FlowItem
Exemplo n.º 2
0
def prepare_items(dry_run: bool = False):
    typer.echo("\n===================" "\nFlowMaster" "\n===================\n")

    from flowmaster.models import FlowItem

    # Clearing statuses for unfulfilled flows.
    FlowItem.clear_statuses_of_lost_items()

    if dry_run:
        typer.echo(f"Dry-run mode!")
        FlowItem.clear("fakedata.etl.flow")
Exemplo n.º 3
0
def delete_notebook(name: str) -> None:
    path = get_filepath_notebook(name)
    if path:
        path.unlink()

    FlowItem.clear(name)
Exemplo n.º 4
0
def clear(name: str):
    for name_ in name.split(","):
        count = FlowItem.clear(name_)
        typer.secho(
            f"  {name_} {typer.style(f'{count=}', fg=typer.colors.WHITE)} OK")