MCPcopy Index your code
hub / github.com/feast-dev/feast / _drain_locked

Method _drain_locked

sdk/python/feast/feature_server.py:1100–1113  ·  view source on GitHub ↗

Drain a single buffer; caller must hold self._lock.

(self, key: _OfflineBatchKey)

Source from the content-addressed store, hash-verified

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 """

Callers 1

_flushMethod · 0.95

Calls 1

getMethod · 0.80

Tested by

no test coverage detected