(self)
| 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 |
no test coverage detected