1
0
mirror of https://github.com/vrtmrz/obsidian-livesync.git synced 2024-12-15 09:14:07 +02:00

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".
This commit is contained in:
Vichaya Raksakunpanich 2023-11-24 16:25:16 +07:00 committed by GitHub
parent ac9428e96b
commit 5802ed31be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1391,15 +1391,15 @@ export class ObsidianLiveSyncSettingTab extends PluginSettingTab {
}).addClass("wizardHidden"); }).addClass("wizardHidden");
new Setting(containerSyncSettingEl) new Setting(containerSyncSettingEl)
.setName("Batch size") .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") .setClass("wizardHidden")
.addText((text) => { .addText((text) => {
text.setPlaceholder("") text.setPlaceholder("")
.setValue(this.plugin.settings.batch_size + "") .setValue(this.plugin.settings.batch_size + "")
.onChange(async (value) => { .onChange(async (value) => {
let v = Number(value); let v = Number(value);
if (isNaN(v) || v < 10) { if (isNaN(v) || v < 2) {
v = 10; v = 2;
} }
this.plugin.settings.batch_size = v; this.plugin.settings.batch_size = v;
await this.plugin.saveSettings(); await this.plugin.saveSettings();
@ -1409,15 +1409,15 @@ export class ObsidianLiveSyncSettingTab extends PluginSettingTab {
new Setting(containerSyncSettingEl) new Setting(containerSyncSettingEl)
.setName("Batch limit") .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") .setClass("wizardHidden")
.addText((text) => { .addText((text) => {
text.setPlaceholder("") text.setPlaceholder("")
.setValue(this.plugin.settings.batches_limit + "") .setValue(this.plugin.settings.batches_limit + "")
.onChange(async (value) => { .onChange(async (value) => {
let v = Number(value); let v = Number(value);
if (isNaN(v) || v < 10) { if (isNaN(v) || v < 2) {
v = 10; v = 2;
} }
this.plugin.settings.batches_limit = v; this.plugin.settings.batches_limit = v;
await this.plugin.saveSettings(); await this.plugin.saveSettings();