File size: 567 Bytes
f8c1b22 4868000 f8c1b22 4868000 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
from typing import Any, Dict, List
from .operator import StreamInstanceOperator
class Tasker:
pass
class FormTask(Tasker, StreamInstanceOperator):
inputs: List[str]
outputs: List[str]
metrics: List[str]
def process(self, instance: Dict[str, Any], stream_name: str = None) -> Dict[str, Any]:
inputs = {key: instance[key] for key in self.inputs}
outputs = {key: instance[key] for key in self.outputs}
return {
"inputs": inputs,
"outputs": outputs,
"metrics": self.metrics,
}
|