pauseSync method
void
pauseSync()
Pauses all synchronization activity for this manager.
While paused, any calls to synchronize() will be skipped immediately.
This also stops any running auto-sync timers for this manager.
Implementation
void pauseSync() {
_prePauseStatus = currentStatus.status;
// Remember which users had active auto-sync timers, then cancel the timers
// WITHOUT going through stopAutoSync() (which would clear the very list we
// just populated once _isSyncPaused is set). This makes pause/resume robust
// regardless of statement ordering.
_pausedAutoSyncUserIds.addAll(_autoSyncTimers.keys);
_cancelAllAutoSyncTimers();
_isSyncPaused = true;
if (!_statusSubject.isClosed) {
_statusSubject.add(currentStatus.copyWith(status: DatumSyncStatus.paused));
}
_logger.info('Sync paused for manager $T.');
}