From 38d760364d5a297e73838bac2094e04424253e63 Mon Sep 17 00:00:00 2001 From: Felix Hammerl Date: Tue, 30 Sep 2014 17:54:35 +0200 Subject: [PATCH 1/4] [WO-588] add options to get update notifications in batches --- package.json | 2 +- src/js/app-config.js | 1 + src/js/app-controller.js | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index ca7da8f..80fb30d 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "crypto-lib": "~0.2.1", "dompurify": "~0.4.2", "express": "^4.8.3", - "imap-client": "~0.4.0", + "imap-client": "https://github.com/whiteout-io/imap-client/tarball/dev/WO-588", "jquery": "~2.1.1", "mailreader": "~0.3.5", "ng-infinite-scroll": "~1.1.2", diff --git a/src/js/app-config.js b/src/js/app-config.js index ec7a4be..b20d371 100644 --- a/src/js/app-config.js +++ b/src/js/app-config.js @@ -179,6 +179,7 @@ define(function(require) { outboxMailboxName: 'Outbox', outboxMailboxType: 'Outbox', connDocTimeout: 5000, + imapUpdateBatchSize: 100 }; /** diff --git a/src/js/app-controller.js b/src/js/app-controller.js index 5745371..b629381 100644 --- a/src/js/app-controller.js +++ b/src/js/app-controller.js @@ -221,6 +221,7 @@ define(function(require) { return; } + credentials.imap.maxUpdateSize = config.imapUpdateBatchSize; initClients(credentials); }); From 9521d6b990697d988bc150c3d118c46004c72a26 Mon Sep 17 00:00:00 2001 From: Felix Hammerl Date: Thu, 2 Oct 2014 17:58:35 +0200 Subject: [PATCH 2/4] [WO-588] use 25 messages update batches --- src/js/app-config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/app-config.js b/src/js/app-config.js index b20d371..b520f42 100644 --- a/src/js/app-config.js +++ b/src/js/app-config.js @@ -179,7 +179,7 @@ define(function(require) { outboxMailboxName: 'Outbox', outboxMailboxType: 'Outbox', connDocTimeout: 5000, - imapUpdateBatchSize: 100 + imapUpdateBatchSize: 25 }; /** From 771b03e13adf9f530bc6d4494acf01c2274ea166 Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Thu, 2 Oct 2014 18:11:17 +0200 Subject: [PATCH 3/4] Update package.json --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 80fb30d..1ded9b2 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "crypto-lib": "~0.2.1", "dompurify": "~0.4.2", "express": "^4.8.3", - "imap-client": "https://github.com/whiteout-io/imap-client/tarball/dev/WO-588", + "imap-client": "~0.4.3", "jquery": "~2.1.1", "mailreader": "~0.3.5", "ng-infinite-scroll": "~1.1.2", @@ -65,4 +65,4 @@ "mocha": "~1.13.0", "sinon": "~1.7.3" } -} \ No newline at end of file +} From b02989e7663c8ebb3a339d1164273787e9b5978c Mon Sep 17 00:00:00 2001 From: Felix Hammerl Date: Thu, 2 Oct 2014 18:15:32 +0200 Subject: [PATCH 4/4] [WO-588] move maxUpdateSize assignment --- src/js/app-controller.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/app-controller.js b/src/js/app-controller.js index b629381..ba358e0 100644 --- a/src/js/app-controller.js +++ b/src/js/app-controller.js @@ -221,11 +221,13 @@ define(function(require) { return; } - credentials.imap.maxUpdateSize = config.imapUpdateBatchSize; initClients(credentials); }); function initClients(credentials) { + // add the maximum update batch size for imap folders to the imap configuration + credentials.imap.maxUpdateSize = config.imapUpdateBatchSize; + var pgpMailer = new PgpMailer(credentials.smtp, self._pgpbuilder); var imapClient = new ImapClient(credentials.imap); imapClient.onError = onConnectionError;