[Core] Exit autoscaler with a non-zero exit code upon handling SIGINT/SIGTERM (#14518)

This commit is contained in:
Clark Zinzow 2021-03-31 11:08:02 -06:00 committed by GitHub
parent 32e50b8c67
commit 91cf272c2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -261,8 +261,9 @@ class Monitor:
redis_client, ray_constants.MONITOR_DIED_ERROR, message)
def _signal_handler(self, sig, frame):
return self._handle_failure(f"Terminated with signal {sig}\n" +
"".join(traceback.format_stack(frame)))
self._handle_failure(f"Terminated with signal {sig}\n" +
"".join(traceback.format_stack(frame)))
sys.exit(sig + 128)
def run(self):
# Register signal handlers for autoscaler termination.