Handle SIGTERM - begin graceful shutdown.
(self, sig, frame)
| 247 | return futures.ThreadPoolExecutor(max_workers=self.cfg.threads) |
| 248 | |
| 249 | def handle_exit(self, sig, frame): |
| 250 | """Handle SIGTERM - begin graceful shutdown.""" |
| 251 | if self.alive: |
| 252 | self.alive = False |
| 253 | # Wake up the poller so it can start shutdown |
| 254 | self.method_queue.defer(lambda: None) |
| 255 | |
| 256 | def handle_quit(self, sig, frame): |
| 257 | """Handle SIGQUIT - immediate shutdown.""" |