Skip to content

Commit

Permalink
revert back tendermint.py signal handling
Browse files Browse the repository at this point in the history
  • Loading branch information
solarw committed Oct 3, 2024
1 parent ba12664 commit 522aad5
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions operate/services/utils/tendermint.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,6 @@ def __init__(
self.log_file = os.environ.get("LOG_FILE", DEFAULT_TENDERMINT_LOG_FILE)
self.write_to_log = write_to_log

def _set_on_stop_handler(self):
signal.signal(signal.SIGINT, self._stop_signal_handler)
signal.signal(signal.SIGTERM, self._stop_signal_handler)

def _stop_signal_handler(self):
self.logger.info("Handling stop signal!")
self.stop()

def _build_init_command(self) -> List[str]:
"""Build the 'init' command."""
cmd = [
Expand Down Expand Up @@ -266,7 +258,6 @@ def _start_monitoring_thread(self) -> None:

def start(self, debug: bool = False) -> None:
"""Start a Tendermint node process."""
self._set_on_stop_handler()
self._start_tm_process(debug)
self._start_monitoring_thread()

Expand Down Expand Up @@ -319,8 +310,8 @@ def _stop_monitoring_thread(self) -> None:

def stop(self) -> None:
"""Stop a Tendermint node process."""
self._stop_monitoring_thread()
self._stop_tm_process()
self._stop_monitoring_thread()

@staticmethod
def _write_to_console(line: str) -> None:
Expand Down

0 comments on commit 522aad5

Please sign in to comment.