Hi all β I think I'm having a slow morning, but does anyone have a good heuristic around where to start debugging when you're trying to pass the result of one task to another, but your flow schematic is showing them as being unconnected? For example, I have something like:
Copy code
@task
def custom_task_1(input) -> str:
return f"Custom Input: {input}"
with Flow(...) as flow:
custom_task_1_results = custom_task_1("Hello World!")
custom_task_2 = CustomTask2(message=custom_task_1_results)
but when I look at my flow's schematic, it doesn't show
custom_task_1
as being upstream of
CustomTask2
...I don't remember ever having run into this, so I feel like there's something quite obvious that I must be missing. I appreciate any help!
k
Kevin Kho
09/09/2021, 3:17 PM
Hey @Sean Talia definitely out of the ordinary. If I have to guess, you may want to try adding
CustomTask2()(message=custom_task_1_results)
so that both the init and run are called? Otherwise itβs just the init called. I assume that is a class.
s
Sean Talia
09/09/2021, 5:00 PM
yep, my problem was that I hadn't set up my custom task to let the
message
be passed in as runtime, only at task initialization, so it didn't like it when I tried to pass a task result to the constructor π
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.