Italo Barros
requests.exceptions.SSLError: HTTPSConnectionPool(host='<http://api.prefect.io|api.prefect.io>', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:852)'),))
Tim-Oliver
hagai
Unknown setting 'PREFECT_SERVER_ALLOW_EPHEMERAL_MODE'. (type=value_error)
prefect config unset PREFECT_SERVER_ALLOW_EPHEMERAL_MODE
Alan
from prefect import get_client from prefect.server.schemas.states import State, StateType from prefect.server.schemas.filters import FlowRunFilter, FlowRunFilterState, FlowRunFilterStateName, FlowRunFilterStateType import asyncio async def get_cancelling_flows(): async with get_client() as client: state_filter = FlowRunFilter(state=FlowRunFilterState(type=FlowRunFilterStateType(any_=['CANCELLED']))) # Query all flow runs flow_runs = await client.read_flow_runs(flow_run_filter=state_filter) cancelled_state = State(type=StateType.CANCELLED) # Loop through each flow run and change its state to "CANCELLED" for flow in flow_runs: try: await client.set_flow_run_state( flow_run_id=flow.id, state=cancelled_state, force=True ) print(f"Flow run {flow.id} has been set to CANCELLED.") except Exception as e: print(e) # Run the async function to get the cancelling flows asyncio.run(get_cancelling_flows())
Keith Hickey
Ofir
POST /model
Numline1
Maity
Valentin Baert
Steffen
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.