コード例 #1
0
        public static Task ProcessPriceListAsyncInsertsCorrect(ElasticClient client, IEnumerable <PriceItem> prices)
        {
            BulkAllObservable <PriceItem> bulkAllObservable = CreateBulkAllObservable(client, prices);

            bulkAllObservable.Wait(TimeSpan.FromMinutes(60), null);

            return(Task.CompletedTask);
        }
コード例 #2
0
        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);
        }