Drain a single buffer; caller must hold self._lock.
(self, key: _OfflineBatchKey)
| 1098 | logger.debug("OfflineWriteBatcher background loop exiting") |
| 1099 | |
| 1100 | def _drain_locked(self, key: _OfflineBatchKey) -> Optional[List[pd.DataFrame]]: |
| 1101 | """ |
| 1102 | Drain a single buffer; caller must hold self._lock. |
| 1103 | """ |
| 1104 | if key in self._inflight: |
| 1105 | return None |
| 1106 | |
| 1107 | dfs = self._buffers.get(key) |
| 1108 | if not dfs: |
| 1109 | return None |
| 1110 | |
| 1111 | self._buffers[key] = [] |
| 1112 | self._inflight.add(key) |
| 1113 | return dfs |
| 1114 | |
| 1115 | def _flush(self, key: _OfflineBatchKey) -> None: |
| 1116 | """ |