@seidor-cloud-produtos/orbit-backend-lib 1.101.20 → 1.101.22

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.
@@ -17,8 +17,8 @@ class Cache {
17
17
  }
18
18
  setElegibleClients(contingencyClients) {
19
19
  this.elegibleClients = [
20
- this.client,
21
20
  ...(contingencyClients || []),
21
+ this.client,
22
22
  ];
23
23
  }
24
24
  setOptions(options) {
@@ -35,11 +35,16 @@ class Cache {
35
35
  for (let i = 0; i < this.elegibleClients.length; i++) {
36
36
  const currentClient = this.elegibleClients[i];
37
37
  try {
38
+ console.log('currentClient.start()');
38
39
  await currentClient.start();
40
+ console.log('currentClient.isRunning()');
39
41
  isRunning = await currentClient.isRunning();
40
42
  }
41
- catch (e) { }
43
+ catch (e) {
44
+ console.log('catch currentClient.isRunning()');
45
+ }
42
46
  if (isRunning) {
47
+ console.log('this.client.close()');
43
48
  await this.client.close();
44
49
  this.client = currentClient;
45
50
  break;
@@ -134,11 +139,14 @@ class Cache {
134
139
  isRunning = await this.client.isRunning();
135
140
  }
136
141
  catch (e) {
142
+ console.log('catch do isRunning', isContingency);
137
143
  if (options?.throwOnError || this.options?.throwOnError) {
144
+ console.log('handleException', isContingency);
138
145
  await this.handleException(e);
139
146
  }
140
147
  }
141
148
  if (!isRunning && !isContingency) {
149
+ console.log('setRunningClient', isContingency);
142
150
  await this.setRunningClient();
143
151
  return await this.isRunning(options, true);
144
152
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seidor-cloud-produtos/orbit-backend-lib",
3
- "version": "1.101.20",
3
+ "version": "1.101.22",
4
4
  "description": "Internal lib for backend components",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",