feat: removed bg services

This commit is contained in:
2025-09-08 02:30:01 +03:00
parent dfda4992f4
commit f5bead8bf0
2 changed files with 2 additions and 6 deletions

View File

@@ -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
}

View File

@@ -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