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

Method shutdown

sdk/python/feast/feature_server.py:1044–1059  ·  view source on GitHub ↗

Stop the background thread and perform a best-effort flush.

(self, timeout: float = 5.0)

Source from the content-addressed store, hash-verified

1042 self._flush(key)
1043
1044 def shutdown(self, timeout: float = 5.0) -> None:
1045 """
1046 Stop the background thread and perform a best-effort flush.
1047 """
1048 logger.debug("Shutting down OfflineWriteBatcher")
1049 self._stop_event.set()
1050 try:
1051 self._thread.join(timeout=timeout)
1052 except Exception:
1053 logger.exception("Error joining OfflineWriteBatcher thread")
1054
1055 # Best-effort final flush
1056 try:
1057 self.flush_all()
1058 except Exception:
1059 logger.exception("Error during final OfflineWriteBatcher flush")
1060
1061 # ---------- Internal helpers ----------
1062

Callers 1

lifespanFunction · 0.45

Calls 4

flush_allMethod · 0.95
setMethod · 0.80
exceptionMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected