refactor(success_rate): update the default configs (#8098)

This commit is contained in:
Chethan Rao
2025-05-22 01:43:10 +05:30
committed by GitHub
parent 278618cc1e
commit 1cdd7d1de3
2 changed files with 6 additions and 6 deletions

View File

@ -889,12 +889,12 @@ impl Default for SuccessBasedRoutingConfig {
Self { Self {
params: Some(vec![DynamicRoutingConfigParams::PaymentMethod]), params: Some(vec![DynamicRoutingConfigParams::PaymentMethod]),
config: Some(SuccessBasedRoutingConfigBody { config: Some(SuccessBasedRoutingConfigBody {
min_aggregates_size: Some(2), min_aggregates_size: Some(5),
default_success_rate: Some(100.0), default_success_rate: Some(100.0),
max_aggregates_size: Some(3), max_aggregates_size: Some(8),
current_block_threshold: Some(CurrentBlockThreshold { current_block_threshold: Some(CurrentBlockThreshold {
duration_in_mins: Some(5), duration_in_mins: None,
max_total_count: Some(2), max_total_count: Some(5),
}), }),
specificity_level: SuccessRateSpecificityLevel::default(), specificity_level: SuccessRateSpecificityLevel::default(),
}), }),

View File

@ -1779,11 +1779,11 @@ pub async fn perform_decide_gateway_call_with_open_router(
); );
routable_connectors.sort_by(|connector_choice_a, connector_choice_b| { routable_connectors.sort_by(|connector_choice_a, connector_choice_b| {
let connector_choice_a_score = gateway_priority_map let connector_choice_a_score = gateway_priority_map
.get(&connector_choice_a.connector.to_string()) .get(&connector_choice_a.to_string())
.copied() .copied()
.unwrap_or(0.0); .unwrap_or(0.0);
let connector_choice_b_score = gateway_priority_map let connector_choice_b_score = gateway_priority_map
.get(&connector_choice_b.connector.to_string()) .get(&connector_choice_b.to_string())
.copied() .copied()
.unwrap_or(0.0); .unwrap_or(0.0);
connector_choice_b_score connector_choice_b_score