https://prefect.io logo
a

An Hoang

12/03/2021, 4:02 PM
question: Can I change the directory of the process of the flow execution midway through the flow? Maybe by doing a
ShellTask("cd directory/to/switch/to")
? so that all of the results outputted are now ``directory/to/switch/to/result` ? My
directory/to/switch/to/
is templated at runtime and is a result of a task. Right now I have to pass this path as parameter to all subsequent tasks. Wondering if there's a more efficient/less error-prone way for this
k

Kevin Kho

12/03/2021, 4:15 PM
I think the quick answer is no but are you templating it with items from the context? That might be more doable
a

An Hoang

12/03/2021, 4:41 PM
Nope it's from the task
process_parameter_A(parameterA)
so alot of processing in between. Can I add this
process_parameter_A(parameterA)
into the context inside the task? I remember vaguely that that's not recommended
k

Kevin Kho

12/03/2021, 4:44 PM
Ah yeah I don’t think this is doable then, if persisting in context works for you, then I guess it’s fine. The alternative is the KV store.
5 Views