Initiate shutdown. Args: mode: "graceful" (SIGTERM) or "quick" (SIGINT) Returns: Dictionary with status
(self, mode: str = "graceful")
| 438 | return {"status": "reopening"} |
| 439 | |
| 440 | def shutdown(self, mode: str = "graceful") -> dict: |
| 441 | """ |
| 442 | Initiate shutdown. |
| 443 | |
| 444 | Args: |
| 445 | mode: "graceful" (SIGTERM) or "quick" (SIGINT) |
| 446 | |
| 447 | Returns: |
| 448 | Dictionary with status |
| 449 | """ |
| 450 | if mode == "quick": |
| 451 | os.kill(self.arbiter.pid, signal.SIGINT) |
| 452 | else: |
| 453 | os.kill(self.arbiter.pid, signal.SIGTERM) |
| 454 | |
| 455 | return {"status": "shutting_down", "mode": mode} |
| 456 | |
| 457 | def show_all(self) -> dict: |
| 458 | """ |
no outgoing calls