lesgo 2.1.9 → 2.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/services/RDSAuroraMySQLProxyService/disconnectMySQLProxyClient.d.ts +3 -0
- package/dist/services/RDSAuroraMySQLProxyService/disconnectMySQLProxyClient.js +21 -20
- package/dist/utils/db/mysql/proxy/disconnectDb.d.ts +3 -0
- package/dist/utils/db/mysql/proxy/disconnectDb.js +3 -0
- package/package.json +1 -1
|
@@ -32,29 +32,30 @@ var __awaiter =
|
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
34
|
import { logger } from '../../utils';
|
|
35
|
-
import { singleton } from '../RDSAuroraMySQLProxyService/getMySQLProxyClient';
|
|
36
35
|
const FILE =
|
|
37
36
|
'lesgo.services.RDSAuroraMySQLProxyService.disconnectMySQLProxyClient';
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated Disconnect db is no longer to be used due to the use of ConnectionPool
|
|
39
|
+
*/
|
|
38
40
|
const disconnectMySQLProxyClient = () =>
|
|
39
41
|
__awaiter(void 0, void 0, void 0, function* () {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
);
|
|
42
|
+
logger.warn(`${FILE}::DEPRECATED_FUNCTION_DO_NOT_END_POOL_CONNECTION`);
|
|
43
|
+
// const singletonConns = Object.keys(singleton);
|
|
44
|
+
// if (singletonConns.length === 0) {
|
|
45
|
+
// logger.debug(`${FILE}::NO_CONNECTIONS_TO_DISCONNECT`);
|
|
46
|
+
// return;
|
|
47
|
+
// }
|
|
48
|
+
// logger.debug(`${FILE}::PREPARING_TO_DISCONNECT`, {
|
|
49
|
+
// singletonConns,
|
|
50
|
+
// });
|
|
51
|
+
// singletonConns.forEach(async singletonConn => {
|
|
52
|
+
// try {
|
|
53
|
+
// await singleton[singletonConn].end();
|
|
54
|
+
// delete singleton[singletonConn];
|
|
55
|
+
// logger.debug(`${FILE}::COMPLETED`, { singletonConn });
|
|
56
|
+
// } catch (err) {
|
|
57
|
+
// logger.error(`${FILE}::ERROR`, { singletonConn, err });
|
|
58
|
+
// }
|
|
59
|
+
// });
|
|
59
60
|
});
|
|
60
61
|
export default disconnectMySQLProxyClient;
|