Skip to content

Commit

Permalink
Removed sigkill
Browse files Browse the repository at this point in the history
Signed-off-by: Zen <[email protected]>
  • Loading branch information
desultory committed Dec 18, 2023
1 parent b4762d1 commit 5e1a9ef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/json_exporter/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from logging import getLogger, StreamHandler
from argparse import ArgumentParser
from signal import signal, SIGINT, SIGTERM, SIGQUIT, SIGABRT, SIGKILL
from signal import signal

from json_exporter import JSONExporter

Expand Down Expand Up @@ -58,7 +58,8 @@ def handle_shutdown_signal(sig, frame):
exporter.shutdown()
exit(0)

for sig in [SIGINT, SIGTERM, SIGQUIT, SIGABRT, SIGKILL]:
# Handle SIGINT, SIGTERM, SIGQUIT, SIGABRT
for sig in [2, 15, 3, 6]:
signal(sig, handle_shutdown_signal)

exporter.serve_forever()
Expand Down

0 comments on commit 5e1a9ef

Please sign in to comment.