sync every 5 minutes (up from 1); start the score threshold at 75 (down from 100); decrement threshold by 25 each iteration (up from 5). these changes guarantee even small changes will sync in no more than 15 minutes (down from 20)

This commit is contained in:
Dan Mills 2008-07-08 21:24:59 -07:00
Родитель 57c0a00aea
Коммит 56d15bb003
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -53,16 +53,16 @@ const Cu = Components.utils;
// we'll sync it, reset its threshold to the initial value, rinse, and repeat. // we'll sync it, reset its threshold to the initial value, rinse, and repeat.
// How long we wait between sync checks. // How long we wait between sync checks.
const SCHEDULED_SYNC_INTERVAL = 60 * 1000; // one minute const SCHEDULED_SYNC_INTERVAL = 60 * 1000 * 5; // five minutes
// INITIAL_THRESHOLD represents the value an engine's score has to exceed // INITIAL_THRESHOLD represents the value an engine's score has to exceed
// in order for us to sync it the first time we start up (and the first time // in order for us to sync it the first time we start up (and the first time
// we do a sync check after having synced the engine or reset the threshold). // we do a sync check after having synced the engine or reset the threshold).
const INITIAL_THRESHOLD = 100; const INITIAL_THRESHOLD = 75;
// THRESHOLD_DECREMENT_STEP is the amount by which we decrement an engine's // THRESHOLD_DECREMENT_STEP is the amount by which we decrement an engine's
// threshold each time we do a sync check and don't sync that engine. // threshold each time we do a sync check and don't sync that engine.
const THRESHOLD_DECREMENT_STEP = 5; const THRESHOLD_DECREMENT_STEP = 25;
Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://weave/log4moz.js"); Cu.import("resource://weave/log4moz.js");