From 5802ed31be1083887018addf03300cd11abf760e Mon Sep 17 00:00:00 2001 From: Vichaya Raksakunpanich Date: Fri, 24 Nov 2023 16:25:16 +0700 Subject: [PATCH] Update ObsidianLiveSyncSettingTab.ts Lower payload size limit and batch limit to 2 due to IBM Cloudant read/write limitation. Hope it will fix the "Replication error". --- src/ObsidianLiveSyncSettingTab.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ObsidianLiveSyncSettingTab.ts b/src/ObsidianLiveSyncSettingTab.ts index 6da3fc4..54963c2 100644 --- a/src/ObsidianLiveSyncSettingTab.ts +++ b/src/ObsidianLiveSyncSettingTab.ts @@ -1391,15 +1391,15 @@ export class ObsidianLiveSyncSettingTab extends PluginSettingTab { }).addClass("wizardHidden"); new Setting(containerSyncSettingEl) .setName("Batch size") - .setDesc("Number of change feed items to process at a time. Defaults to 50.") + .setDesc("Number of change feed items to process at a time. Defaults to 50. Minimum is 2.") .setClass("wizardHidden") .addText((text) => { text.setPlaceholder("") .setValue(this.plugin.settings.batch_size + "") .onChange(async (value) => { let v = Number(value); - if (isNaN(v) || v < 10) { - v = 10; + if (isNaN(v) || v < 2) { + v = 2; } this.plugin.settings.batch_size = v; await this.plugin.saveSettings(); @@ -1409,15 +1409,15 @@ export class ObsidianLiveSyncSettingTab extends PluginSettingTab { new Setting(containerSyncSettingEl) .setName("Batch limit") - .setDesc("Number of batches to process at a time. Defaults to 40. This along with batch size controls how many docs are kept in memory at a time.") + .setDesc("Number of batches to process at a time. Defaults to 40. Minimum is 2. This along with batch size controls how many docs are kept in memory at a time.") .setClass("wizardHidden") .addText((text) => { text.setPlaceholder("") .setValue(this.plugin.settings.batches_limit + "") .onChange(async (value) => { let v = Number(value); - if (isNaN(v) || v < 10) { - v = 10; + if (isNaN(v) || v < 2) { + v = 2; } this.plugin.settings.batches_limit = v; await this.plugin.saveSettings();