fieldryand / goflow

Simple but powerful DAG scheduler and dashboard
MIT License
393 stars 31 forks source link

Does it support context passing for tasks in workflows? #17

Open Ph03n1xRt opened 1 year ago

Ph03n1xRt commented 1 year ago

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

fieldryand commented 1 year ago

Sorry, this functionality is not supported. :(

Ph03n1xRt commented 1 year ago

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

fieldryand commented 1 year ago

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.

Ph03n1xRt commented 1 year ago

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.

zengzhengrong commented 10 months ago

@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

fieldryand commented 10 months ago

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 commented 6 days ago

Hi! I have an update on this. v3.0.1 (pre-release version at this point) introduces context passing, which makes chaining results or parameters somewhat easier. You can see a usage example here: https://github.com/fieldryand/goflow/blob/v.3.0.1/examples/chained/goflow-example-chained.go

Ph03n1xRt commented 5 days ago

Thank you very much for this update