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

Method _signal_error

cassandra/cluster.py:4170–4188  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4168 return query
4169
4170 def _signal_error(self):
4171 with self._lock:
4172 if self._is_shutdown:
4173 return
4174
4175 # try just signaling the cluster, as this will trigger a reconnect
4176 # as part of marking the host down
4177 if self._connection and self._connection.is_defunct:
4178 host = self._cluster.metadata.get_host(self._connection.endpoint)
4179 # host may be None if it's already been removed, but that indicates
4180 # that errors have already been reported, so we're fine
4181 if host:
4182 self._cluster.signal_connection_failure(
4183 host, self._connection.last_error, is_host_addition=False)
4184 return
4185
4186 # if the connection is not defunct or the host already left, reconnect
4187 # manually
4188 self.reconnect()
4189
4190 def on_up(self, host):
4191 pass

Callers 2

refresh_schemaMethod · 0.95

Calls 3

reconnectMethod · 0.95
get_hostMethod · 0.45

Tested by

no test coverage detected