def _handle_sigterm(self, signum, frame): log.debug("Caught sigterm. Stopping run loop.") self.run_forever = False if JMXFetch.is_running(): JMXFetch.stop() if self.collector: self.collector.stop() log.debug("Collector is stopped.")
def stop(self): log.debug("Windows Service - Stopping collector") self.collector.stop() if JMXFetch.is_running(): JMXFetch.stop() self.running = False