Пример #1
0
        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;
            }
        }
Пример #2
0
 public async Task CheckpointAsync()
 {
     await _context.CheckpointAsync();
 }