B2G/gecko/services/sync/modules/policies.js
/**
   * Check if we should be syncing and schedule the next sync, if it's not scheduled
   */
Check if we should be syncing and schedule the next sync, if it's not scheduled
Check if we should be syncing and schedule the next sync if it ' s not scheduled
function checkSyncStatus() {
    let ignore = [kSyncBackoffNotMet, kSyncMasterPasswordLocked];
    let skip = Weave.Service._checkSync(ignore);
    this._log.trace("_checkSync returned \"" + skip + "\".");
    if (skip) {
      this.clearSyncTriggers();
      return;
    }
    let wait;
    if (this.globalScore > this.syncThreshold) {
      this._log.debug("Global Score threshold hit, triggering sync.");
      wait = 0;
    }
    this.scheduleNextSync(wait);
  }
function checkSyncStatus ( ) { let ignore = [ kSyncBackoffNotMet , kSyncMasterPasswordLocked ] ; let skip = Weave . Service . _checkSync ( ignore ) ; this . _log . trace ( "_checkSync returned \"" + skip + "\"." ) ; if ( skip ) { this . clearSyncTriggers ( ) ; return ; } let wait ; if ( this . globalScore > this . syncThreshold ) { this . _log . debug ( "Global Score threshold hit, triggering sync." ) ; wait = 0 ; } this . scheduleNextSync ( wait ) ; }
Check if we should be syncing and schedule the next sync, if it's not scheduled
Check if we should be syncing and schedule the next sync if it ' s not scheduled
// Should we be syncing now, if not, cancel any sync timers and return // if we're in backoff, we'll schedule the next sync. // Only set the wait time to 0 if we need to sync right away