Condense debug output for skipped up-to-date items when syncing
This commit is contained in:
parent
7dce069490
commit
bfbac24667
1 changed files with 6 additions and 1 deletions
|
@ -371,17 +371,22 @@ Zotero.Sync.Data.Engine.prototype._downloadUpdatedObjects = Zotero.Promise.corou
|
||||||
let versions = yield objectsClass.getObjectVersions(
|
let versions = yield objectsClass.getObjectVersions(
|
||||||
this.libraryID, Object.keys(results.versions)
|
this.libraryID, Object.keys(results.versions)
|
||||||
);
|
);
|
||||||
|
let upToDate = [];
|
||||||
for (let key in results.versions) {
|
for (let key in results.versions) {
|
||||||
// Skip objects that are already up-to-date. Generally all returned objects should have
|
// Skip objects that are already up-to-date. Generally all returned objects should have
|
||||||
// newer version numbers, but there are some situations, such as full syncs or
|
// newer version numbers, but there are some situations, such as full syncs or
|
||||||
// interrupted syncs, where we may get versions for objects that are already up-to-date
|
// interrupted syncs, where we may get versions for objects that are already up-to-date
|
||||||
// locally.
|
// locally.
|
||||||
if (versions[key] == results.versions[key]) {
|
if (versions[key] == results.versions[key]) {
|
||||||
Zotero.debug("Skipping up-to-date " + objectType + " " + this.libraryID + "/" + key);
|
upToDate.push(key);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
keys.push(key);
|
keys.push(key);
|
||||||
}
|
}
|
||||||
|
if (upToDate.length) {
|
||||||
|
Zotero.debug(`Skipping up-to-date ${objectTypePlural} in library ${this.libraryID}: `
|
||||||
|
+ upToDate.sort().join(", "));
|
||||||
|
}
|
||||||
|
|
||||||
// In child-items mode, remove top-level items that just failed
|
// In child-items mode, remove top-level items that just failed
|
||||||
if (objectType == 'item' && !options.top && this.failedItems.length) {
|
if (objectType == 'item' && !options.top && this.failedItems.length) {
|
||||||
|
|
Loading…
Reference in a new issue