rbt_mssql-pool-party
Version:
Extension of mssql that provides management of multiple connection pools, dsns, retries, and more
12 lines (9 loc) • 323 B
JavaScript
/* eslint no-param-reassign: 0 */
const statKeys = ['healCount', 'promotionCount', 'retryCount', 'lastPromotionAt', 'lastHealAt'];
// this function mutates toPool
export default function copyPoolStats(fromPool, toPool) {
statKeys.forEach((statKey) => {
toPool[statKey] = fromPool[statKey];
});
return toPool;
}