feat: removed bg services
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user