MCPcopy
hub / github.com/redis/redis-py / __del__

Method __del__

redis/client.py:1022–1029  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1020 self.reset()
1021
1022 def __del__(self) -> None:
1023 try:
1024 # if this object went out of scope prior to shutting down
1025 # subscriptions, close the connection manually before
1026 # returning it to the connection pool
1027 self.reset()
1028 except Exception:
1029 pass
1030
1031 def reset(self) -> None:
1032 if self.connection:

Callers

nothing calls this directly

Calls 1

resetMethod · 0.95

Tested by

no test coverage detected