https://prefect.io logo
Title
d

Daniel Nilsen

03/07/2022, 4:26 PM
I am trying to register a flow to my helm deployed server with
flow.register(«myProject»)
. To connect to the server I change the
server.endpoint
in config.toml to the correct url. This works. But I don’t want to change the config manualy like this. Is there a way to temporarily change it when registering? I have tried
set_temporary_config({"server.endpoint": "123"})
but it does not seem to work 🤔
k

Kevin Kho

03/07/2022, 4:27 PM
So Client takes in an endpoint. I just need to check if
flow.register()
will use the existing client
Well I guess not. What you can do is
import os
and
os.environ["PREFECT___SERVER___ENDPOINT"]="your_endpoint"
and then when you import Prefect, this env variable is set in the context. You need to do it before you import Prefect though
d

Daniel Nilsen

03/07/2022, 9:51 PM
ah ok, thanks!