Clean up some comments and debug lines
This commit is contained in:
parent
a1bd2bace5
commit
2f0391fb9c
1 changed files with 5 additions and 7 deletions
|
@ -498,15 +498,13 @@ Zotero.Sync.Data.Engine.prototype._downloadObjects = Zotero.Promise.coroutine(fu
|
||||||
var conflicts = [];
|
var conflicts = [];
|
||||||
var num = 0;
|
var num = 0;
|
||||||
|
|
||||||
// Process batches when they're available, one at a time
|
// Process batches of object data as they're available, one at a time
|
||||||
yield Zotero.Promise.map(
|
yield Zotero.Promise.map(
|
||||||
json,
|
json,
|
||||||
Zotero.Promise.coroutine(function* (batch) {
|
Zotero.Promise.coroutine(function* (batch) {
|
||||||
this._failedCheck();
|
this._failedCheck();
|
||||||
|
|
||||||
Zotero.debug(`Processing batch of downloaded ${objectTypePlural} in `
|
Zotero.debug(`Processing batch of downloaded ${objectTypePlural} in ${this.library.name}`);
|
||||||
+ this.library.name);
|
|
||||||
|
|
||||||
|
|
||||||
if (!Array.isArray(batch)) {
|
if (!Array.isArray(batch)) {
|
||||||
this.failed = batch;
|
this.failed = batch;
|
||||||
|
@ -527,7 +525,8 @@ Zotero.Sync.Data.Engine.prototype._downloadObjects = Zotero.Promise.coroutine(fu
|
||||||
onObjectProcessed: () => {
|
onObjectProcessed: () => {
|
||||||
num++;
|
num++;
|
||||||
},
|
},
|
||||||
// Increase the notifier batch size as we go
|
// Increase the notifier batch size as we go, so that new items start coming in
|
||||||
|
// one by one but then switch to larger chunks
|
||||||
getNotifierBatchSize: () => {
|
getNotifierBatchSize: () => {
|
||||||
var size;
|
var size;
|
||||||
if (num < 10) {
|
if (num < 10) {
|
||||||
|
@ -603,8 +602,7 @@ Zotero.Sync.Data.Engine.prototype._downloadObjects = Zotero.Promise.coroutine(fu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Zotero.debug("All " + objectTypePlural + " for "
|
Zotero.debug(`All ${objectTypePlural} for ${this.library.name} saved to database`);
|
||||||
+ this.library.name + " saved to database");
|
|
||||||
|
|
||||||
if (objectType == 'item') {
|
if (objectType == 'item') {
|
||||||
this.failedItems = [];
|
this.failedItems = [];
|
||||||
|
|
Loading…
Add table
Reference in a new issue