goflow icon indicating copy to clipboard operation
goflow copied to clipboard

Does it support context passing for tasks in workflows?

Open Ph03n1xRt opened this issue 2 years ago • 8 comments

How do I transfer the results of a parent task to child tasks?

Ph03n1xRt avatar Mar 17 '23 06:03 Ph03n1xRt

Sorry, this functionality is not supported. :(

fieldryand avatar Mar 18 '23 07:03 fieldryand

Is there any way to support parameter transfer? Do you have any good ideas or suggestions

Ph03n1xRt avatar Mar 20 '23 03:03 Ph03n1xRt

I don't have time to work on this functionality in the near future, but PRs are welcome if you want to tackle it. :)

Alternatively, have you looked at solutions such as Prefect, Dagster or Airflow? Maybe those would suit your use case better.

fieldryand avatar Mar 20 '23 21:03 fieldryand

thanks,If I implement this function, I will give you a PR, but currently I have no good ideas for solving this problem. If you have any suggestions, please give me a hint.

Ph03n1xRt avatar Mar 21 '23 01:03 Ph03n1xRt

@fieldryand I have a simple way to do this by adding context to the Job struct and passing the Job in the operator https://github.com/fieldryand/goflow/pull/50

zengzhengrong avatar Jan 28 '24 03:01 zengzhengrong

Thanks @zengzhengrong ! I was also thinking about how to do this. My idea was to require a context as an argument to Operator.Run.

I would like to merge some unrelated changes first and then we can tackle this context-passing feature.

fieldryand avatar Jan 28 '24 10:01 fieldryand