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 ea48b19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redislite/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def _cleanup(self, sys_modules=None):
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)
os.kill(process.pid, signal.SIGKILL)
except psutil.NoSuchProcess:
pass
self.socket_file = None
Expand Down

0 comments on commit ea48b19

Please sign in to comment.