MCPcopy Create free account
hub / github.com/apache/cassandra-nodejs-driver / handleNoHostAvailable

Method handleNoHostAvailable

lib/request-handler.js:283–295  ·  view source on GitHub ↗

* @param {NoHostAvailableError} err * @param {RequestExecution|null} execution

(err, execution)

Source from the content-addressed store, hash-verified

281 * @param {RequestExecution|null} execution
282 */
283 handleNoHostAvailable(err, execution) {
284 if (execution !== null) {
285 // Remove the execution
286 const index = this._executions.indexOf(execution);
287 this._executions.splice(index, 1);
288 }
289
290 if (this._executions.length === 0) {
291 // There aren't any other executions, we should report back to the user that there isn't
292 // a host available for executing the request
293 this.setCompleted(err);
294 }
295 }
296
297 /**
298 * Gets a long lived closure that can fetch the next page.

Callers 2

_startNewExecutionMethod · 0.95
restartMethod · 0.80

Calls 1

setCompletedMethod · 0.95

Tested by

no test coverage detected