Skip to content

Commit

Permalink
Reset changes made to SIGTERM/SIGINT stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Wout Feys committed Aug 22, 2024
1 parent b6ffc5b commit f017156
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion aikido_firewall/background_process/comms.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ def start_aikido_listener(self):
# the aikido server, so we shouldn't start the background process
return
# Daemon is set to True so that the process kills itself when the main process dies
self.send_data_to_bg_process("KILL", None)
self.background_process = Process(
target=AikidoBackgroundProcess, args=(self.address, self.key), daemon=True
)
Expand Down
6 changes: 2 additions & 4 deletions aikido_firewall/decorators/gunicorn.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
Includes all the wrappers for gunicorn config file
"""

import atexit
import aikido_firewall
from aikido_firewall.background_process import get_comms
from aikido_firewall.helpers.logging import logger


def when_ready(prev_func):
Expand All @@ -15,6 +12,7 @@ def when_ready(prev_func):
"""

def aik_when_ready(server):
aikido_firewall.protect("background-process-only")
prev_func(server)

return aik_when_ready
Expand All @@ -27,7 +25,7 @@ def post_fork(prev_func):
"""

def aik_post_fork(server, worker):
aikido_firewall.protect()
aikido_firewall.protect(server=False)
prev_func(server, worker)

return aik_post_fork

0 comments on commit f017156

Please sign in to comment.