Question about environment variables, if I set som...
# prefect-community
c
Question about environment variables, if I set something like
"FOO": "BAR"
in the run config, and then do something like
os.environ["FOO"]: "BAZ"
in the flow.py - what will
FOO
bet set to when the flow runs?
I'm asking because we have a script that runs to automatically register our flows in addition to setting the run config; there's one flow where I'd like to set
PREFECT__CLOUD__HEARTBEAT_MODE
which is currently being set in the run_config. so my thought was to set it in the flow using os.environ
k
If you set it using
os.environ
, that needs to happen before you import prefect because when you import prefect, the context is already loaded in. It should work I think as long as you are using a script-based storage instead of pickle
🙌 1