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:
@@ -27,7 +27,7 @@ func RegisterAdapterGRPC(server *grpc.Server, marketplacesRepository marketplace
|
||||
}
|
||||
func (a *AdapterGRPC) GetProducts(req *pb.GetProductsRequest, stream pb.ProductsService_GetProductsServer) error {
|
||||
ctx := stream.Context()
|
||||
resultChan := make(chan []pb.Product)
|
||||
resultChan := make(chan []pb.Product, 10)
|
||||
errChan := make(chan error)
|
||||
go a.repo.StreamAllProductsCache(ctx, int(req.MarketplaceId), resultChan, errChan)
|
||||
for {
|
||||
|
||||
Reference in New Issue
Block a user