is it possible that this value is being predefined...
# ask-community
k
is it possible that this value is being predefined when the flow is built/registered and thus not using the most up to date value (the one at flow execution time)?
n
Hi @Kyle McChesney - I think you’re correct that those values are being determined at registration and not execution time; try moving that import into the task itself. So long as the
settings.py
file is importable within the docker image you should be able to get the correct env values
k
@Matan Drory
z
You might also want to look into script-based storage vs pickle-based https://docs.prefect.io/orchestration/flow_config/storage.html#pickle-vs-script-based-storage -- if you're using pickle-based storage those values could get pickled at registration time instead of execution time.
upvote 1
k
Thanks! I moved the imports into the function for now. I will look at script storage
🙌 1