Vitaly Shulgin
12/18/2020, 2:51 PMnicholas
Vitaly Shulgin
12/18/2020, 4:39 PMVitaly Shulgin
12/18/2020, 4:41 PMwith prefect.context(key='abc'):
flow.run() # this run is successful
nicholas
from prefect import task, Flow
@task
def init_context():
return dict(
a=1,
b=2,
c=3
)
with Flow("I do important things") as flow:
context = init_context()
important_thing_1(context=context, ...other_stuff_i_need)
important_thing_2(context=context, ...other_stuff_i_need)
Vitaly Shulgin
12/18/2020, 4:47 PMnicholas
Vitaly Shulgin
12/18/2020, 5:05 PMprefect.context['somekey'] = value
, I can not get that key in other tasknicholas
Vitaly Shulgin
12/18/2020, 7:12 PM