MongoDB.destroyManager()

Destroy the specified connection manager and all of its active connections.

This may involve destroying a pool and its connections, destroying multiple pools and their connections, doing nothing at all (if this manager just does ad-hoc connections), or something even more exotic. The implementation is left up to the driver.

Usage

Hover over inputs/exits for more info.

var MongoDB = require('machinepack-mongo');


// Destroy the specified connection manager and all of its active connections.

MongoDB.destroyManager({

manager: '===',

meta: '===',

}).execSync();

Inputs

manager required

The connection manager instance to destroy.

'==='
meta

Additional stuff to pass to the driver.

'==='

Exits

error

An unexpected error occurred.

failed

The provided connection manager (and/or any of its active connections) could not be destroyed.

{ error: '===', meta: '===' }
success

OK.

'==='