badmfck-api-server 3.8.7 → 3.8.8

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.
@@ -93,7 +93,7 @@ async function Initializer(services) {
93
93
  }
94
94
  exports.Initializer = Initializer;
95
95
  class APIService extends BaseService_1.BaseService {
96
- version = "3.8.7";
96
+ version = "3.8.8";
97
97
  options;
98
98
  monitor = null;
99
99
  started = new Date();
@@ -442,7 +442,7 @@ class MysqlAdapter {
442
442
  try {
443
443
  let result = null;
444
444
  if (this.options.maxQueryTimeout && this.options.maxQueryTimeout > 0)
445
- result = await this.withTimeout(conn.query(query), this.options.maxQueryTimeout ?? 1000 * 25, query);
445
+ result = await this.withTimeout(conn.query(query), this.options.maxQueryTimeout, query);
446
446
  else
447
447
  result = await conn.query(query);
448
448
  this.lastSuccessQueryTime = +new Date();
@@ -458,6 +458,11 @@ class MysqlAdapter {
458
458
  };
459
459
  }
460
460
  catch (e) {
461
+ if (request.transactionID) {
462
+ const trx = this.transactions.find(i => i.id === request.transactionID);
463
+ if (trx)
464
+ this.storeTransactionAsProblem(trx, query);
465
+ }
461
466
  if (!request.transactionID && doCloseConnection)
462
467
  this.finalizeConnection(conn);
463
468
  else if (request.transactionID && request.throwable) {
@@ -648,7 +653,6 @@ class MysqlAdapter {
648
653
  try {
649
654
  (0, LogService_1.logDB)("Rollback started", trx.conn.threadId);
650
655
  await trx.conn.rollback();
651
- await trx.conn.commit();
652
656
  trx.conn.removeAllListeners();
653
657
  trx.conn.release();
654
658
  (0, LogService_1.logDB)("Rollback connection released", trx.conn.threadId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "badmfck-api-server",
3
- "version": "3.8.7",
3
+ "version": "3.8.8",
4
4
  "description": "Simple API http server based on express",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",