Hey everyone I'm confused with the meanings of var...
# ask-community
t
Hey everyone I'm confused with the meanings of various flow runs - Failed, Cancelled, Finished, Skipped. Since I am migrating from Aiflow where we had the concept of "pausing" and "unpausing" a DAG, I'd like to know how we can replicate that behaviour over here. Ideally when I hit pause, all I want to do is stop rescheduling more flows until I hit "unpause". Although the tasks in the current flow should continue to run. How could I achieve that with Prefect ? (By the way I'm loving prefect with versioning, parameters, prefect cloud ~ all that 🤟)
a
@Tilak Maddy
concept of “pausing” and “unpausing” a DAG
the equivalent of this would be pausing a schedule. You can do that in Prefect either from the UI or using the set_schedule_inactive mutation:
Copy code
from prefect.client.client import Client

client = Client()
    
flow_id = {"flow_id": "2a6897de-e148-42fc-910e-2c36ddfd5605"}
response = client.graphql(
    """
    mutation($flow_id: UUID!) {
        set_schedule_inactive(input: {flow_id: $flow_id}) {
            success
            error
        }
    }""",
    variables=flow_id,
    raise_on_error=True,
)

print(response)
🙏 1
and thanks for the positive feedback!
🤟 1
t
Oh thanks @Anna Geller , could you also give me the links to relevant docs ? (for set_schedule_inactive)
a
@Tilak Maddy this explains all about scheduling: https://docs.prefect.io/orchestration/flow-runs/scheduling.html#scheduling-flow-runs the very last section is the one about toggling the schedule