pg-mvc-service 2.0.28 → 2.0.29

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.
@@ -99,8 +99,17 @@ class BaseCron {
99
99
  }
100
100
  tearDown() {
101
101
  return __awaiter(this, void 0, void 0, function* () {
102
- if (this.isExecuteRollback === false) {
103
- this.rollback();
102
+ try {
103
+ if (this.isExecuteRollback === false) {
104
+ yield this.rollback();
105
+ }
106
+ }
107
+ finally {
108
+ // クライアント接続をリリース
109
+ if (this.client) {
110
+ this.client.release();
111
+ this.client = undefined;
112
+ }
104
113
  }
105
114
  });
106
115
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pg-mvc-service",
3
- "version": "2.0.28",
3
+ "version": "2.0.29",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/n-daira/npm-pack_mvc-service#readme",
6
6
  "bugs": {
@@ -86,8 +86,16 @@ export class BaseCron {
86
86
  }
87
87
 
88
88
  public async tearDown() {
89
- if (this.isExecuteRollback === false) {
90
- this.rollback();
89
+ try {
90
+ if (this.isExecuteRollback === false) {
91
+ await this.rollback();
92
+ }
93
+ } finally {
94
+ // クライアント接続をリリース
95
+ if (this.client) {
96
+ this.client.release();
97
+ this.client = undefined;
98
+ }
91
99
  }
92
100
  }
93
101