feat: adjust rate limits for tariffs in Yandex Market API
This commit is contained in:
		@@ -25,7 +25,7 @@ import (
 | 
			
		||||
const (
 | 
			
		||||
	defaultChunkSize       = 200
 | 
			
		||||
	offerMappingsRateLimit = 600
 | 
			
		||||
	tariffsRateLimit       = 100
 | 
			
		||||
	tariffsRateLimit       = 95
 | 
			
		||||
	rateLimitWindow        = time.Minute
 | 
			
		||||
	maxPageSize            = math.MaxInt32
 | 
			
		||||
)
 | 
			
		||||
@@ -242,7 +242,6 @@ func (r *apiRepository) CalculateProductTariffs(ctx context.Context, marketplace
 | 
			
		||||
		}
 | 
			
		||||
		if globalError != nil {
 | 
			
		||||
			fmt.Printf("Error processing chunk %d: %s\n", chunkIndex+1, err)
 | 
			
		||||
			errChan <- fmt.Errorf("failed to process chunk %d: %w", chunkIndex+1, err)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user