@budibase/backend-core 2.13.11 → 2.13.13

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.
package/dist/index.js CHANGED
@@ -2766,10 +2766,12 @@ function getRedisConnectionDetails() {
2766
2766
  url = url[0];
2767
2767
  }
2768
2768
  const [host, port] = url.split(":");
2769
+ const portNumber = parseInt(port);
2769
2770
  return {
2770
2771
  host,
2771
2772
  password,
2772
- port: parseInt(port)
2773
+ // assume default port for redis if invalid found
2774
+ port: isNaN(portNumber) ? 6379 : portNumber
2773
2775
  };
2774
2776
  }
2775
2777
  function getRedisOptions() {
@@ -6077,6 +6079,7 @@ init_init();
6077
6079
  init_src();
6078
6080
  init_context2();
6079
6081
  init_environment2();
6082
+ init_logging();
6080
6083
  async function getClient(type, opts) {
6081
6084
  if (type === "custom" /* CUSTOM */) {
6082
6085
  return newRedlock(opts);
@@ -6159,16 +6162,14 @@ async function doWithLock(opts, task) {
6159
6162
  const result = await task();
6160
6163
  return { executed: true, result };
6161
6164
  } catch (e) {
6162
- console.warn("lock error");
6165
+ logWarn(`lock type: ${opts.type} error`, e);
6163
6166
  if (e.name === "LockError") {
6164
6167
  if (opts.type === "try_once" /* TRY_ONCE */) {
6165
6168
  return { executed: false };
6166
6169
  } else {
6167
- console.error(e);
6168
6170
  throw e;
6169
6171
  }
6170
6172
  } else {
6171
- console.error(e);
6172
6173
  throw e;
6173
6174
  }
6174
6175
  } finally {