commit 2bf5382431699620f0a9ae51a725a031e4429e3f
parent d527c340c68ac79e6f3615eb5eaf2f24baed15b6
Author: Adomas VenĨkauskas <adomas.ven@gmail.com>
Date: Thu, 27 Apr 2017 11:40:26 +0300
Log errors from syncRunner concurrent caller
Diffstat:
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/chrome/content/zotero/xpcom/sync/syncRunner.js b/chrome/content/zotero/xpcom/sync/syncRunner.js
@@ -57,9 +57,12 @@ Zotero.Sync.Runner_Module = function (options = {}) {
Zotero.defineProperty(this, 'apiKey', { set: val => _apiKey = val });
Components.utils.import("resource://zotero/concurrentCaller.js");
- this.caller = new ConcurrentCaller(4);
- this.caller.setLogger(msg => Zotero.debug(msg));
- this.caller.stopOnError = stopOnError;
+ this.caller = new ConcurrentCaller({
+ numConcurrent: 4,
+ stopOnError: true,
+ logger: msg => Zotero.debug(msg),
+ onError: e => Zotero.logError(e)
+ });
var _enabled = false;
var _autoSyncTimer;