public static Task ProcessPriceListAsyncInsertsCorrect(ElasticClient client, IEnumerable <PriceItem> prices) { BulkAllObservable <PriceItem> bulkAllObservable = CreateBulkAllObservable(client, prices); bulkAllObservable.Wait(TimeSpan.FromMinutes(60), null); return(Task.CompletedTask); }
public static Task ProcessPriceListAsyncInsertsDouble(ElasticClient client, IEnumerable <PriceItem> prices) { BulkAllObservable <PriceItem> bulkAllObservable = CreateBulkAllObservable(client, prices); bulkAllObservable.Subscribe(new BulkAllObserver( onNext: response => Console.WriteLine("Starting next batch"), onError: Console.WriteLine, onCompleted: () => Console.WriteLine("DONE!") )); bulkAllObservable.Wait(TimeSpan.FromMinutes(60), null); return(Task.CompletedTask); }