From f5bead8bf0aa95adfac07b1e9278e6b8497be3d9 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 8 Sep 2025 02:30:01 +0300 Subject: [PATCH] feat: removed bg services --- internal/ozon/products/repository_api.go | 4 +--- internal/wb/products/repository_api.go | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/internal/ozon/products/repository_api.go b/internal/ozon/products/repository_api.go index 80fd842..cb2bb30 100644 --- a/internal/ozon/products/repository_api.go +++ b/internal/ozon/products/repository_api.go @@ -8,8 +8,6 @@ import ( "sipro-mps/internal/ozon" "sipro-mps/internal/ozon/products/mapping/generated" "sipro-mps/internal/redis" - "sipro-mps/internal/tasks/client" - "sipro-mps/internal/tasks/types" "sipro-mps/pkg/utils" "strconv" "sync" @@ -145,7 +143,7 @@ func (a *apiRepository) StreamAllProductsCache(ctx context.Context, marketplaceI err = redis.ReadProtoMessage(ctx, key, &cachedMessage) if err == nil && len(cachedMessage.Products) > 0 { resultChan <- utils.DerefSlice(cachedMessage.Products) - _ = client.EnqueueFetchProductsTask(types.TypeOzonFetchProducts, marketplaceId) + //_ = client.EnqueueFetchProductsTask(types.TypeOzonFetchProducts, marketplaceId) return } diff --git a/internal/wb/products/repository_api.go b/internal/wb/products/repository_api.go index 50f4b37..1f694b4 100644 --- a/internal/wb/products/repository_api.go +++ b/internal/wb/products/repository_api.go @@ -6,8 +6,6 @@ import ( pb "sipro-mps/api/generated/v1/wb/products" "sipro-mps/internal/marketplace" "sipro-mps/internal/redis" - "sipro-mps/internal/tasks/client" - "sipro-mps/internal/tasks/types" "sipro-mps/internal/wb" "sipro-mps/internal/wb/products/mapping/generated" wbapi "sipro-mps/pkg/api/wb/client" @@ -118,7 +116,7 @@ func (a apiRepository) StreamAllProductsCache(ctx context.Context, marketplaceId err = redis.ReadProtoMessage(ctx, key, &cachedMessage) if err == nil && len(cachedMessage.Products) > 0 { resultChan <- utils.DerefSlice(cachedMessage.Products) - _ = client.EnqueueFetchProductsTask(types.TypeWbFetchProducts, marketplaceId) + //_ = client.EnqueueFetchProductsTask(types.TypeWbFetchProducts, marketplaceId) return } locker := *redis.Locker