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

Method deregister_connect_callback

redis/asyncio/connection.py:328–337  ·  view source on GitHub ↗

De-register a previously registered callback. It will no-longer receive notifications on connection events. Calling this is not required when the listener goes away, since the callbacks are kept as weak methods.

(self, callback)

Source from the content-addressed store, hash-verified

326 self._connect_callbacks.append(wm)
327
328 def deregister_connect_callback(self, callback):
329 """
330 De-register a previously registered callback. It will no-longer receive
331 notifications on connection events. Calling this is not required when the
332 listener goes away, since the callbacks are kept as weak methods.
333 """
334 try:
335 self._connect_callbacks.remove(weakref.WeakMethod(callback))
336 except ValueError:
337 pass
338
339 def set_parser(self, parser_class: Type[BaseParser]) -> None:
340 """

Callers 2

__del__Method · 0.45
acloseMethod · 0.45

Calls 1

removeMethod · 0.80

Tested by

no test coverage detected