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.
@@ -1,2 +1,5 @@
1
+ /**
2
+ * @deprecated Disconnect db is no longer to be used due to the use of ConnectionPool
3
+ */
1
4
  declare const disconnectMySQLProxyClient: () => Promise<void>;
2
5
  export default disconnectMySQLProxyClient;
@@ -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
- const singletonConns = Object.keys(singleton);
41
- if (singletonConns.length === 0) {
42
- logger.debug(`${FILE}::NO_CONNECTIONS_TO_DISCONNECT`);
43
- return;
44
- }
45
- logger.debug(`${FILE}::PREPARING_TO_DISCONNECT`, {
46
- singletonConns,
47
- });
48
- singletonConns.forEach(singletonConn =>
49
- __awaiter(void 0, void 0, void 0, function* () {
50
- try {
51
- yield singleton[singletonConn].end();
52
- delete singleton[singletonConn];
53
- logger.debug(`${FILE}::COMPLETED`, { singletonConn });
54
- } catch (err) {
55
- logger.error(`${FILE}::ERROR`, { singletonConn, err });
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;
@@ -1,2 +1,5 @@
1
+ /**
2
+ * @deprecated Disconnect db is no longer to be used due to the use of ConnectionPool
3
+ */
1
4
  declare const disconnectDb: () => Promise<void>;
2
5
  export default disconnectDb;
@@ -1,4 +1,7 @@
1
1
  import { disconnectMySQLProxyClient } from '../../../../services/RDSAuroraMySQLProxyService';
2
+ /**
3
+ * @deprecated Disconnect db is no longer to be used due to the use of ConnectionPool
4
+ */
2
5
  const disconnectDb = () => {
3
6
  return disconnectMySQLProxyClient();
4
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lesgo",
3
- "version": "2.1.9",
3
+ "version": "2.1.10",
4
4
  "description": "Core framework for lesgo node.js serverless framework.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",