def t2(ctx: TaskContext): ctx.ensure_all_ready() a = ctx.inputs.get_or_throw("a", int) b = ctx.configs.get_or_throw("b", str) ctx.outputs["_0"] = a + len(b) ctx.outputs["_1"] = a - len(b) ctx.log.info("done")
def _interfaceless_wrapper(ctx: TaskContext) -> None: ctx.ensure_all_ready() func = to_function(ctx.metadata.get_or_throw("__interfaceless_func", object)) o = func(**ctx.inputs, **ctx.configs) res = list(o) if isinstance(o, tuple) else [o] n = 0 for k in ctx.outputs.keys(): ctx.outputs[k] = res[n] n += 1