Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
refactor(core): remove hardcoded timeout limit of 5s for outgoing webhook requests (#8725)
Kashif8c7ddaa46d48
diff --git a/crates/router/src/core/webhooks/outgoing.rs b/crates/router/src/core/webhooks/outgoing.rsindex cf7cbb8a2d..baa5b4af58 100644--- a/crates/router/src/core/webhooks/outgoing.rs+++ b/crates/router/src/core/webhooks/outgoing.rs@@ -45,8 +45,6 @@ use crate::{workflows::outgoing_webhook_retry,};-const OUTGOING_WEBHOOK_TIMEOUT_SECS: u64 = 5;-#[allow(clippy::too_many_arguments)]#[instrument(skip_all)]pub(crate) async fn create_event_and_trigger_outgoing_webhook(@@ -338,7 +336,7 @@ async fn trigger_webhook_to_merchant(let response = state.api_client- .send_request(&state, request, Some(OUTGOING_WEBHOOK_TIMEOUT_SECS), false)+ .send_request(&state, request, None, false).await;metrics::WEBHOOK_OUTGOING_COUNT.add(diff --git a/crates/router/src/core/webhooks/outgoing_v2.rs b/crates/router/src/core/webhooks/outgoing_v2.rsindex 0650bd2e8d..07758817e6 100644--- a/crates/router/src/core/webhooks/outgoing_v2.rs+++ b/crates/router/src/core/webhooks/outgoing_v2.rs@@ -396,12 +396,7 @@ async fn build_and_send_request(state.api_client- .send_request(- state,- request,- Some(types::OUTGOING_WEBHOOK_TIMEOUT_SECS),- false,- )+ .send_request(state, request, None, false).await}diff --git a/crates/router/src/core/webhooks/types.rs b/crates/router/src/core/webhooks/types.rsindex 90d637d894..dcea7f9c16 100644--- a/crates/router/src/core/webhooks/types.rs+++ b/crates/router/src/core/webhooks/types.rs@@ -11,8 +11,6 @@ use crate::{types::storage::{self, enums},};-pub const OUTGOING_WEBHOOK_TIMEOUT_SECS: u64 = 5;-#[derive(Debug)]pub enum ScheduleWebhookRetry {WithProcessTracker(Box<storage::ProcessTracker>),