Пример #1
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")
Пример #2
0
def prepare_for_run(dry_run: bool = False):
    init()

    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:
        FlowItem.delete().where("fakedata.etl.flow" in FlowItem.name).execute()