Send KILL to minode process

This commit is contained in:
Dmitri Bogomolov 2021-08-02 21:23:23 +03:00
parent 154ac3643e
commit 5c7bbed0f5
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13

View File

@ -1,6 +1,7 @@
"""Launching an external app with the network queue"""
import atexit
import logging
import signal
import subprocess
@ -23,4 +24,9 @@ class MinodeProcess(object):
def stop(self):
self.process.send_signal(signal.SIGTERM)
self.process.wait(10)
try:
self.process.wait(10)
except:
logger = logging.getLogger('default')
logger.warning('Failed to stop process', exc_info=True)
self.process.send_signal(signal.SIGKILL)