parent
55688a8104
commit
95ba68a757
|
@ -715,7 +715,6 @@ Zotero.Sync.Data.Engine.prototype._startUpload = Zotero.Promise.coroutine(functi
|
||||||
libraryVersion = yield this._uploadObjects(
|
libraryVersion = yield this._uploadObjects(
|
||||||
objectType, objectIDs[objectType], libraryVersion
|
objectType, objectIDs[objectType], libraryVersion
|
||||||
);
|
);
|
||||||
Zotero.debug("Library version is " + libraryVersion);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Zotero.debug(JSON.stringify(objectDeletions));
|
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) {
|
Zotero.Sync.Data.Engine.prototype._uploadObjects = Zotero.Promise.coroutine(function* (objectType, ids, libraryVersion) {
|
||||||
let objectTypePlural = Zotero.DataObjectUtilities.getObjectTypePlural(objectType);
|
let objectTypePlural = Zotero.DataObjectUtilities.getObjectTypePlural(objectType);
|
||||||
let objectsClass = Zotero.DataObjectUtilities.getObjectsClassForObjectType(objectType);
|
let objectsClass = Zotero.DataObjectUtilities.getObjectsClassForObjectType(objectType);
|
||||||
Zotero.debug("Uploading " + objectTypePlural);
|
|
||||||
Zotero.debug(ids);
|
|
||||||
|
|
||||||
let queue = [];
|
let queue = [];
|
||||||
for (let id of ids) {
|
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;
|
let failureDelayGenerator = null;
|
||||||
|
|
||||||
while (queue.length) {
|
while (queue.length) {
|
||||||
// Get a slice of the queue and generate JSON for objects if necessary
|
// Get a slice of the queue and generate JSON for objects if necessary
|
||||||
let batch = [];
|
let batch = [];
|
||||||
let numSkipped = 0;
|
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];
|
let o = queue[i];
|
||||||
// Skip requests that failed with 4xx
|
// Skip requests that failed with 4xx
|
||||||
if (o.failed) {
|
if (o.failed) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user