Better debug output for full sync
This commit is contained in:
parent
92ec1324dc
commit
62ef910631
|
@ -1329,9 +1329,12 @@ Zotero.Sync.Data.Engine.prototype._fullSync = Zotero.Promise.coroutine(function*
|
||||||
}
|
}
|
||||||
|
|
||||||
if (toDownload.length) {
|
if (toDownload.length) {
|
||||||
Zotero.debug("Downloading missing/outdated " + objectTypePlural + " in " + this.library.name);
|
Zotero.debug("Downloading missing/outdated " + objectTypePlural);
|
||||||
yield this._downloadObjects(objectType, toDownload);
|
yield this._downloadObjects(objectType, toDownload);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
Zotero.debug(`No missing/outdated ${objectTypePlural} to download`);
|
||||||
|
}
|
||||||
|
|
||||||
// Mark synced objects that don't exist remotely as unsynced
|
// Mark synced objects that don't exist remotely as unsynced
|
||||||
let syncedKeys = yield Zotero.Sync.Data.Local.getSynced(objectType, this.libraryID);
|
let syncedKeys = yield Zotero.Sync.Data.Local.getSynced(objectType, this.libraryID);
|
||||||
|
@ -1353,8 +1356,7 @@ Zotero.Sync.Data.Engine.prototype._fullSync = Zotero.Promise.coroutine(function*
|
||||||
for (let key of remoteMissing) {
|
for (let key of remoteMissing) {
|
||||||
let id = objectsClass.getIDFromLibraryAndKey(this.libraryID, key);
|
let id = objectsClass.getIDFromLibraryAndKey(this.libraryID, key);
|
||||||
if (!id) {
|
if (!id) {
|
||||||
Zotero.logError(ObjectType + " " + this.libraryID + "/" + key
|
Zotero.logError(`ObjectType ${key} not found to mark as unsynced`);
|
||||||
+ " not found to mark as unsynced");
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (remoteDeleted[objectTypePlural].indexOf(key) != -1) {
|
if (remoteDeleted[objectTypePlural].indexOf(key) != -1) {
|
||||||
|
@ -1377,12 +1379,14 @@ Zotero.Sync.Data.Engine.prototype._fullSync = Zotero.Promise.coroutine(function*
|
||||||
// For remotely missing objects that exist locally, reset version, since old
|
// For remotely missing objects that exist locally, reset version, since old
|
||||||
// version will no longer match remote, and mark for upload
|
// version will no longer match remote, and mark for upload
|
||||||
if (toUpload.length) {
|
if (toUpload.length) {
|
||||||
Zotero.debug("Marking remotely missing synced " + objectTypePlural
|
Zotero.debug(`Marking remotely missing synced ${objectTypePlural} as unsynced`);
|
||||||
+ " as unsynced");
|
|
||||||
yield objectsClass.updateVersion(toUpload, 0);
|
yield objectsClass.updateVersion(toUpload, 0);
|
||||||
yield objectsClass.updateSynced(toUpload, false);
|
yield objectsClass.updateSynced(toUpload, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
Zotero.debug(`No remotely missing synced ${objectTypePlural}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user