zlacker

[return to "Show HN: Hatchet – Open-source distributed task queue"]
1. krawcz+5f1[view] [source] 2024-03-08 23:44:46
>>abelan+(OP)
Can you explain why you chose every function to take in context? https://github.com/hatchet-dev/hatchet/blob/main/python-sdk/...

This seems like a lot of boiler plate to write functions with to me (context I created http://github.com/DAGWorks-Inc/hamilton).

◧◩
2. abelan+KD1[view] [source] 2024-03-09 04:46:47
>>krawcz+5f1
We did it because there are methods that should be accessed which don't map to `args` cleanly. For example, we let users call `context.log`, `context.done` (to determine whether to return on cancellation) or `context.step_output` (to dynamically access a parent's step output). Perhaps there's a more pythonic way to do this? Admittedly this is a pattern we adapted from Go.
[go to top]