mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 11:24:45 +08:00
refactor(success_rate): update the default configs (#8098)
This commit is contained in:
@ -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(),
|
||||||
}),
|
}),
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user