Debugging for sync issue

This commit is contained in:
Dan Stillman 2017-05-02 16:56:55 -04:00
parent 5e3c7bf63d
commit 4502b5e990

View file

@ -824,7 +824,13 @@ Zotero.Sync.Data.Engine.prototype._startUpload = Zotero.Promise.coroutine(functi
let unsyncedKeys = ids.map(id => objectsClass.getLibraryAndKeyFromID(id).key);
let origUnsynced = unsyncedKeys; // TEMP
let queueKeys = yield Zotero.Sync.Data.Local.getObjectsFromSyncQueue(objectType, this.libraryID);
let num = unsyncedKeys.length;
unsyncedKeys = Zotero.Utilities.arrayDiff(unsyncedKeys, queueKeys);
if (unsyncedKeys.length < num) {
Zotero.debug(`Skipping ${num - unsyncedKeys.length} key(s) in sync queue`);
Zotero.debug(Zotero.Utilities.arrayDiff(unsyncedKeys, queueKeys));
}
// TEMP
//ids = unsyncedKeys.map(key => objectsClass.getIDFromLibraryAndKey(this.libraryID, key));
let missing = [];