private ProtoListBlock GenerateListBlock(ListBlockRequest blockRequest, List <string> values) { var request = new ListBlockCreateRequest(new TaskId(blockRequest.ApplicationName, blockRequest.TaskName), blockRequest.TaskExecutionId, values, blockRequest.SerializedHeader, blockRequest.CompressionThreshold); var listBlock = _blockRepository.AddListBlock(request).Block; Thread.Sleep(5); // guarantee that each block has a unique created date return(listBlock); }
private async Task <ProtoListBlock> GenerateListBlockAsync(ListBlockRequest blockRequest, List <string> values) { var request = new ListBlockCreateRequest(new TaskId(blockRequest.ApplicationName, blockRequest.TaskName), blockRequest.TaskExecutionId, values, blockRequest.SerializedHeader, blockRequest.CompressionThreshold); var listBlock = (await _blockRepository.AddListBlockAsync(request).ConfigureAwait(false)).Block; await Task.Delay(10).ConfigureAwait(false); // guarantee that each block has a unique created date return(listBlock); }