feat: implement HashArray utility and refactor product key generation for Redis
This commit is contained in:
		@@ -53,7 +53,7 @@ func (p *FetchProductsProcessor) ProcessTask(ctx context.Context, task *asynq.Ta
 | 
			
		||||
	productsProto := lo.Map(productsRaw, func(item products.OzonProduct, _ int) *products.PbProduct {
 | 
			
		||||
		return converter.ToProto(&item)
 | 
			
		||||
	})
 | 
			
		||||
	redisKey := fmt.Sprintf("ozon:products:%s", identifier)
 | 
			
		||||
	redisKey := products.GetProductsKey(identifier)
 | 
			
		||||
	err = redis.WriteProtoMessage(ctx, redisKey, &pb.GetListOfProductsResponse{Products: productsProto})
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		fmt.Printf("Failed to write products to Redis for marketplace %s: %v\n", identifier, err)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user