@syncbridge/sqb 0.4.22 → 0.4.24

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.
@@ -55,34 +55,7 @@ let SqbClientComponent = class SqbClientComponent extends ComponentBase {
55
55
  }
56
56
  async _start(abortSignal) {
57
57
  await super._start(abortSignal);
58
- const testConnection = () => {
59
- if (!(this.status === ServiceStatus.starting ||
60
- this.status === ServiceStatus.unhealthy))
61
- return;
62
- this._testConnection();
63
- let aborted = false;
64
- let waitTimer;
65
- abortSignal.addEventListener('abort', () => {
66
- if (aborted)
67
- return;
68
- aborted = true;
69
- clearTimeout(waitTimer);
70
- this.client.close(0);
71
- });
72
- return this.client
73
- .test()
74
- .then(() => {
75
- this.logger?.trace(`Database connection success`);
76
- this.setStatus(ServiceStatus.started);
77
- })
78
- .catch(err => {
79
- waitTimer = setTimeout(testConnection, 5000).unref();
80
- const msg = `Database connection failed. ${err.message}`;
81
- this.logger?.error(msg);
82
- this.setStatus(ServiceStatus.unhealthy, msg);
83
- });
84
- };
85
- await testConnection();
58
+ await this._testConnection(abortSignal);
86
59
  }
87
60
  async _stop() {
88
61
  clearTimeout(this._livenessTimer);
package/constants.js CHANGED
@@ -1,4 +1,4 @@
1
- export const version = '0.4.22';
1
+ export const version = '0.4.24';
2
2
  export const noOp = () => undefined;
3
3
  export const panatesAuthor = {
4
4
  name: 'Panates Technology AS',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncbridge/sqb",
3
- "version": "0.4.22",
3
+ "version": "0.4.24",
4
4
  "description": "SyncBridge SQB database connection components",
5
5
  "author": "Panates Inc",
6
6
  "license": "UNLICENSED",
@@ -13,8 +13,8 @@
13
13
  "oracledb": "^6.10.0"
14
14
  },
15
15
  "peerDependencies": {
16
- "@syncbridge/common": "^0.6.2",
17
- "@syncbridge/builtins": "^0.4.22",
16
+ "@syncbridge/common": "^0.6.3",
17
+ "@syncbridge/builtins": "^0.4.24",
18
18
  "@sqb/builder": ">=4.19.6 <5",
19
19
  "@sqb/connect": ">=4.19.6 <5"
20
20
  },