@budibase/backend-core 2.22.1 → 2.22.3

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
@@ -64126,23 +64126,28 @@ async function invalidateCode(code) {
64126
64126
  var docWritethrough_exports = {};
64127
64127
  __export(docWritethrough_exports, {
64128
64128
  DocWritethrough: () => DocWritethrough,
64129
- docWritethroughProcessorQueue: () => docWritethroughProcessorQueue,
64129
+ DocWritethroughProcessor: () => DocWritethroughProcessor,
64130
64130
  getProcessor: () => getProcessor,
64131
64131
  init: () => init7
64132
64132
  });
64133
64133
  var PERSIST_MAX_ATTEMPTS = 100;
64134
64134
  var processor;
64135
- var docWritethroughProcessorQueue = createQueue(
64136
- "docWritethroughQueue" /* DOC_WRITETHROUGH_QUEUE */,
64137
- {
64138
- jobOptions: {
64139
- attempts: PERSIST_MAX_ATTEMPTS
64135
+ var DocWritethroughProcessor = class _DocWritethroughProcessor {
64136
+ static get queue() {
64137
+ if (!_DocWritethroughProcessor._queue) {
64138
+ _DocWritethroughProcessor._queue = createQueue(
64139
+ "docWritethroughQueue" /* DOC_WRITETHROUGH_QUEUE */,
64140
+ {
64141
+ jobOptions: {
64142
+ attempts: PERSIST_MAX_ATTEMPTS
64143
+ }
64144
+ }
64145
+ );
64140
64146
  }
64147
+ return _DocWritethroughProcessor._queue;
64141
64148
  }
64142
- );
64143
- var DocWritethroughProcessor = class {
64144
64149
  init() {
64145
- docWritethroughProcessorQueue.process(async (message) => {
64150
+ _DocWritethroughProcessor.queue.process(async (message) => {
64146
64151
  try {
64147
64152
  await this.persistToDb(message.data);
64148
64153
  } catch (err) {
@@ -64181,7 +64186,7 @@ var DocWritethrough = class {
64181
64186
  return this._docId;
64182
64187
  }
64183
64188
  async patch(data) {
64184
- await docWritethroughProcessorQueue.add({
64189
+ await DocWritethroughProcessor.queue.add({
64185
64190
  dbName: this.db.name,
64186
64191
  docId: this.docId,
64187
64192
  data