MCPcopy Index your code
hub / github.com/apache/cassandra-python-driver / defunct

Method defunct

cassandra/connection.py:983–1003  ·  view source on GitHub ↗
(self, exc)

Source from the content-addressed store, hash-verified

981 raise NotImplementedError()
982
983 def defunct(self, exc):
984 with self.lock:
985 if self.is_defunct or self.is_closed:
986 return
987 self.is_defunct = True
988
989 exc_info = sys.exc_info()
990 # if we are not handling an exception, just use the passed exception, and don't try to format exc_info with the message
991 if any(exc_info):
992 log.debug("Defuncting connection (%s) to %s:",
993 id(self), self.endpoint, exc_info=exc_info)
994 else:
995 log.debug("Defuncting connection (%s) to %s: %s",
996 id(self), self.endpoint, exc)
997
998 self.last_error = exc
999 self.close()
1000 self.error_all_cp_sessions(exc)
1001 self.error_all_requests(exc)
1002 self.connected_event.set()
1003 return exc
1004
1005 def error_all_cp_sessions(self, exc):
1006 stream_ids = list(self._continuous_paging_sessions.keys())

Callers 15

wait_for_responsesMethod · 0.95
process_msgMethod · 0.95
set_keyspace_blockingMethod · 0.95
process_resultMethod · 0.95
wrapperFunction · 0.80
runMethod · 0.80
_set_resultMethod · 0.80
handle_errorMethod · 0.80
handle_writeMethod · 0.80
handle_readMethod · 0.80
handle_writeMethod · 0.80
handle_readMethod · 0.80

Calls 3

closeMethod · 0.95
error_all_cp_sessionsMethod · 0.95
error_all_requestsMethod · 0.95

Tested by

no test coverage detected