(signum: Any, frame: Any, t_mgr: "NodeProxyManager")
| 198 | |
| 199 | |
| 200 | def 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 | |
| 216 | def main() -> None: |
no test coverage detected