protected override Task PutDocument(RavenJObject document) { if (document != null) { batch.Add(document); if (batch.Count >= SmugglerOptions.BatchSize) { return FlushBatch(); } return new CompletedTask(); } return FlushBatch(); }