MCPcopy Create free account
hub / github.com/ceph/ceph / handler

Function handler

src/ceph-node-proxy/ceph_node_proxy/main.py:200–213  ·  view source on GitHub ↗
(signum: Any, frame: Any, t_mgr: "NodeProxyManager")

Source from the content-addressed store, hash-verified

198
199
200def handler(signum: Any, frame: Any, t_mgr: "NodeProxyManager") -> None:
201 if hasattr(t_mgr, "system") and t_mgr.system is not None:
202 t_mgr.system.pending_shutdown = True
203 t_mgr.log.info("SIGTERM caught, shutting down threads...")
204 t_mgr.shutdown()
205 if (
206 hasattr(t_mgr, "system")
207 and t_mgr.system is not None
208 and hasattr(t_mgr.system, "client")
209 and t_mgr.system.client is not None
210 ):
211 t_mgr.log.info("Logging out from RedFish API")
212 t_mgr.system.client.logout()
213 raise SystemExit(0)
214
215
216def main() -> None:

Callers 5

mainFunction · 0.70
consume_next_recordsMethod · 0.50
replay_segmentMethod · 0.50
replay_segmentMethod · 0.50
newfuncFunction · 0.50

Calls 3

infoMethod · 0.45
shutdownMethod · 0.45
logoutMethod · 0.45

Tested by

no test coverage detected