Queries the data source and returns an iterable of (data, state) tuples. The `data` can be any object. The `state` is a dict with str keys. `Fetch` is called with the last state of the last run of this subtask.
(self, state: Dict, session: Session, ctx: Context)
| 98 | |
| 99 | @abstractmethod |
| 100 | def fetch(self, state: Dict, session: Session, ctx: Context) -> Iterable[Tuple[object, Dict]]: |
| 101 | """ |
| 102 | Queries the data source and returns an iterable of (data, state) tuples. |
| 103 | The `data` can be any object. |
| 104 | The `state` is a dict with str keys. |
| 105 | `Fetch` is called with the last state of the last run of this subtask. |
| 106 | """ |
| 107 | pass |
| 108 | |
| 109 | @abstractmethod |
| 110 | def process(self, data: object, session: Session, ctx: Context): |