Fina Silva-Santisteban
06/09/2021, 6:38 PMflow.register()
method to register flows, I also set the flows’ run config and storage along with that:
flow.run_config = (some run config)
flow.storage = (some storage config)
flow.register(project_name=(project name))
I’d like to switch to using the prefect cli’s register functionality. How can I point it to the run config and storage?Kevin Kho
flow.register()
from that script and use the CLI to register, it will pick up those run_config
and storage
defined in the script. Are you not seeing this behavior?Fina Silva-Santisteban
06/09/2021, 6:41 PMFina Silva-Santisteban
06/09/2021, 6:42 PMKevin Kho
Kevin Kho
from prefect.utilities.storage import extract_flow_from_file
def test_flow(file):
file_path = os.path.abspath(file)
flow = extract_flow_from_file(file_path=file_path)
flow.storage = SomeStorage()
flow.run_config = Run()
flow.register("xxx")
Kevin Kho
Fina Silva-Santisteban
06/09/2021, 6:48 PMKevin Kho
Fina Silva-Santisteban
06/09/2021, 9:20 PM