badmfck-api-server 3.5.4 → 3.5.6
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.
@@ -95,7 +95,7 @@ async function Initializer(services) {
|
|
95
95
|
exports.Initializer = Initializer;
|
96
96
|
class APIService extends BaseService_1.BaseService {
|
97
97
|
static nextLogID = 0;
|
98
|
-
version = "3.5.
|
98
|
+
version = "3.5.6";
|
99
99
|
options;
|
100
100
|
monitor = null;
|
101
101
|
started = new Date();
|
@@ -93,12 +93,6 @@ class LogService extends BaseService_1.BaseService {
|
|
93
93
|
this.checkTextLimit();
|
94
94
|
}
|
95
95
|
async init() {
|
96
|
-
process.on('uncaughtException', (err) => {
|
97
|
-
(0, exports.logError)("uncaughtException", err);
|
98
|
-
});
|
99
|
-
process.on('unhandledRejection', (err) => {
|
100
|
-
(0, exports.logError)("unhandledRejection", err);
|
101
|
-
});
|
102
96
|
exports.REQ_LOG_UNIQUE_SERVICES.listener = async () => {
|
103
97
|
const arr = [];
|
104
98
|
for (let i of this.uniqueServices)
|
@@ -358,6 +358,10 @@ class MysqlAdapter {
|
|
358
358
|
this.rollbackTransaction(this.transactions.find(i => i.id === request.transactionID));
|
359
359
|
this.finalizeConnection(conn);
|
360
360
|
}
|
361
|
+
if (request.transactionID && request.rollbackOnFail && !request.throwable) {
|
362
|
+
this.rollbackTransaction(this.transactions.find(i => i.id === request.transactionID));
|
363
|
+
this.finalizeConnection(conn);
|
364
|
+
}
|
361
365
|
const error = this.createMysqlQueryError(e);
|
362
366
|
if (`${e}`.indexOf('ECONNREFUSED') !== -1)
|
363
367
|
this.recreatePool();
|