Himanshu
10/12/2022, 1:28 PMKalise Richmond
10/12/2022, 3:46 PMHimanshu
10/13/2022, 10:28 AMdef register_flow(flow, project_name, flow_name=None, flow_params=None, schedule=None):
new_flow = flow.copy() # Create a flow copy
new_flow.run_config = UniversalRun(labels=["DESKTOP-ABCD"])
if flow_name:
new_flow.name = flow_name
new_flow.schedule = schedule
client = Client(api_key=config("PREFECT_API_KEY"))
flow_id = client.register(new_flow, project_name=project_name, build=False)
return flow_id
new_flow.register(project_name)
in place of `client.register()` it did not give this error.Kalise Richmond
10/13/2022, 5:48 PMclient.register()
Himanshu
10/14/2022, 10:30 AM