From 95ba68a75727f8087dcd43175a7d9a1bf47c3b99 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 26 Apr 2016 01:34:50 -0400 Subject: [PATCH] =?UTF-8?q?Don't=20skip=20uploads=20of=20more=20than=2025?= =?UTF-8?q?=20items=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #965 --- chrome/content/zotero/xpcom/sync/syncEngine.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/chrome/content/zotero/xpcom/sync/syncEngine.js b/chrome/content/zotero/xpcom/sync/syncEngine.js index 27b3b98b84..a8b382e2b7 100644 --- a/chrome/content/zotero/xpcom/sync/syncEngine.js +++ b/chrome/content/zotero/xpcom/sync/syncEngine.js @@ -715,7 +715,6 @@ Zotero.Sync.Data.Engine.prototype._startUpload = Zotero.Promise.coroutine(functi libraryVersion = yield this._uploadObjects( objectType, objectIDs[objectType], libraryVersion ); - Zotero.debug("Library version is " + libraryVersion); } Zotero.debug(JSON.stringify(objectDeletions)); @@ -793,8 +792,6 @@ Zotero.Sync.Data.Engine.prototype._uploadSettings = Zotero.Promise.coroutine(fun Zotero.Sync.Data.Engine.prototype._uploadObjects = Zotero.Promise.coroutine(function* (objectType, ids, libraryVersion) { let objectTypePlural = Zotero.DataObjectUtilities.getObjectTypePlural(objectType); let objectsClass = Zotero.DataObjectUtilities.getObjectsClassForObjectType(objectType); - Zotero.debug("Uploading " + objectTypePlural); - Zotero.debug(ids); let queue = []; for (let id of ids) { @@ -806,15 +803,13 @@ Zotero.Sync.Data.Engine.prototype._uploadObjects = Zotero.Promise.coroutine(func }); } - Zotero.debug(queue); - let failureDelayGenerator = null; while (queue.length) { // Get a slice of the queue and generate JSON for objects if necessary let batch = []; let numSkipped = 0; - for (let i = 0; i < queue.length && queue.length < this.uploadBatchSize; i++) { + for (let i = 0; i < queue.length && i < this.uploadBatchSize; i++) { let o = queue[i]; // Skip requests that failed with 4xx if (o.failed) {