diff --git a/js/background.js b/js/background.js index f11480993e1..27018df5c31 100644 --- a/js/background.js +++ b/js/background.js @@ -79,16 +79,17 @@ /* eslint-enable */ /* jshint ignore:start */ + const NUM_MESSAGE_UPGRADES_PER_IDLE = 2; const idleDetector = new IdleDetector(); idleDetector.on('idle', async () => { const results = await MessageDataMigrator.processNext({ BackboneMessage: Whisper.Message, BackboneMessageCollection: Whisper.MessageCollection, - count: 3, + count: NUM_MESSAGE_UPGRADES_PER_IDLE, upgradeMessageSchema, wrapDeferred, }); - console.log('Message schema upgrade:', results); + console.log('Upgrade message schema:', results); if (!results.hasMore) { idleDetector.stop(); diff --git a/js/modules/idle_detector.js b/js/modules/idle_detector.js index 384074acef9..9a2ff52b8ce 100644 --- a/js/modules/idle_detector.js +++ b/js/modules/idle_detector.js @@ -3,7 +3,7 @@ const EventEmitter = require('events'); -const POLL_INTERVAL_MS = 10 * 1000; +const POLL_INTERVAL_MS = 30 * 1000; const IDLE_THRESHOLD_MS = 25; class IdleDetector extends EventEmitter {