You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-26 22:41:17 +02:00
All: Added feature flags to disable Joplin Server sync optimisations by default, so that it still work with server 2.0
This commit is contained in:
@@ -378,7 +378,7 @@ export default class Synchronizer {
|
|||||||
this.dispatch({ type: 'SYNC_STARTED' });
|
this.dispatch({ type: 'SYNC_STARTED' });
|
||||||
eventManager.emit('syncStart');
|
eventManager.emit('syncStart');
|
||||||
|
|
||||||
this.logSyncOperation('starting', null, null, `Starting synchronisation to target ${syncTargetId}... [${synchronizationId}]`);
|
this.logSyncOperation('starting', null, null, `Starting synchronisation to target ${syncTargetId}... supportsAccurateTimestamp = ${this.api().supportsAccurateTimestamp}; supportsMultiPut = ${this.api().supportsMultiPut} [${synchronizationId}]`);
|
||||||
|
|
||||||
const handleCannotSyncItem = async (ItemClass: any, syncTargetId: any, item: any, cannotSyncReason: string, itemLocation: any = null) => {
|
const handleCannotSyncItem = async (ItemClass: any, syncTargetId: any, item: any, cannotSyncReason: string, itemLocation: any = null) => {
|
||||||
await ItemClass.saveSyncDisabled(syncTargetId, item, cannotSyncReason, itemLocation);
|
await ItemClass.saveSyncDisabled(syncTargetId, item, cannotSyncReason, itemLocation);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { MultiPutItem } from './file-api';
|
import { MultiPutItem } from './file-api';
|
||||||
import JoplinError from './JoplinError';
|
import JoplinError from './JoplinError';
|
||||||
import JoplinServerApi from './JoplinServerApi';
|
import JoplinServerApi from './JoplinServerApi';
|
||||||
|
import Setting from './models/Setting';
|
||||||
import { trimSlashes } from './path-utils';
|
import { trimSlashes } from './path-utils';
|
||||||
|
|
||||||
// All input paths should be in the format: "path/to/file". This is converted to
|
// All input paths should be in the format: "path/to/file". This is converted to
|
||||||
@@ -33,11 +34,11 @@ export default class FileApiDriverJoplinServer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public get supportsMultiPut() {
|
public get supportsMultiPut() {
|
||||||
return true;
|
return Setting.value('featureFlag.syncMultiPut');
|
||||||
}
|
}
|
||||||
|
|
||||||
public get supportsAccurateTimestamp() {
|
public get supportsAccurateTimestamp() {
|
||||||
return true;
|
return Setting.value('featureFlag.syncAccurateTimestamps');
|
||||||
}
|
}
|
||||||
|
|
||||||
public requestRepeatCount() {
|
public requestRepeatCount() {
|
||||||
|
|||||||
@@ -1242,6 +1242,21 @@ class Setting extends BaseModel {
|
|||||||
appTypes: ['desktop'],
|
appTypes: ['desktop'],
|
||||||
storage: SettingStorage.Database,
|
storage: SettingStorage.Database,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
'featureFlag.syncAccurateTimestamps': {
|
||||||
|
value: false,
|
||||||
|
type: SettingItemType.Bool,
|
||||||
|
public: false,
|
||||||
|
storage: SettingStorage.File,
|
||||||
|
},
|
||||||
|
|
||||||
|
'featureFlag.syncMultiPut': {
|
||||||
|
value: false,
|
||||||
|
type: SettingItemType.Bool,
|
||||||
|
public: false,
|
||||||
|
storage: SettingStorage.File,
|
||||||
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.metadata_ = Object.assign(this.metadata_, this.customMetadata_);
|
this.metadata_ = Object.assign(this.metadata_, this.customMetadata_);
|
||||||
|
|||||||
Reference in New Issue
Block a user