Increase buffer size for result channel in gRPC product retrieval; modify error handling to return nil instead of skipping retry
This commit is contained in:
@@ -29,7 +29,7 @@ func RegisterAdapterGRPC(server *grpc.Server, marketplaceRepo marketplace.Reposi
|
||||
func (g *AdapterGRPC) GetListOfProducts(req *pb.GetListOfProductsRequest, stream pb.ProductsService_GetListOfProductsServer) error {
|
||||
ctx := stream.Context()
|
||||
fmt.Printf("GetListOfProducts called with req: %+v\n", req.MarketplaceId)
|
||||
resultChan := make(chan []pb.Product)
|
||||
resultChan := make(chan []pb.Product, 10)
|
||||
errChan := make(chan error)
|
||||
|
||||
go g.repo.StreamAllProductsCache(ctx, int(req.MarketplaceId), resultChan, errChan) // Запускаем в горутине
|
||||
|
||||
Reference in New Issue
Block a user