Skip to content

Commit

Permalink
Avoid killing oneself if redis gets stuck dieing
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrken committed Aug 16, 2024
1 parent 802f8a0 commit 83ccc7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions redislite/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ def _cleanup(self, sys_modules=None):
break
time.sleep(.1)
if process.is_running() and process.pid != 0:
logger.warning('Redis graceful shutdown failed, forcefully killing pid %r', self.pid)
os.kill(self.pid, signal.SIGKILL)
logger.warning('Redis graceful shutdown failed, forcefully killing pid %r', process.pid)
os.kill(process.pid, signal.SIGKILL)
except psutil.NoSuchProcess:
pass
self.socket_file = None
Expand Down

0 comments on commit 83ccc7f

Please sign in to comment.