public async Task ProcessChangesAsync(IChangeFeedObserverContext context, IReadOnlyList <Document> docs, CancellationToken cancellationToken) { await this.observer.ProcessChangesAsync(context, docs, cancellationToken).ConfigureAwait(false); this.processedDocCount += docs.Count; if (this.IsCheckpointNeeded()) { await context.CheckpointAsync().ConfigureAwait(false); this.processedDocCount = 0; this.lastCheckpointTime = DateTime.UtcNow; } }
public async Task CheckpointAsync() { await _context.CheckpointAsync(); }