feat(webhooks): implement automatic retries for failed webhook deliveries using scheduler (#3842)

This commit is contained in:
Sanchith Hegde
2024-03-04 12:01:02 +05:30
committed by GitHub
parent fee0663d66
commit 5bb67c7dcc
27 changed files with 965 additions and 215 deletions

View File

@ -802,21 +802,19 @@ where
if let Some(event_type) = event_type {
tokio::spawn(
async move {
Box::pin(
webhooks_core::create_event_and_trigger_appropriate_outgoing_webhook(
m_state,
merchant_account,
business_profile,
event_type,
diesel_models::enums::EventClass::Payments,
None,
payment_id,
diesel_models::enums::EventObjectType::PaymentDetails,
webhooks::OutgoingWebhookContent::PaymentDetails(
payments_response_json,
),
Box::pin(webhooks_core::create_event_and_trigger_outgoing_webhook(
m_state,
merchant_account,
business_profile,
event_type,
diesel_models::enums::EventClass::Payments,
None,
payment_id,
diesel_models::enums::EventObjectType::PaymentDetails,
webhooks::OutgoingWebhookContent::PaymentDetails(
payments_response_json,
),
)
))
.await
}
.in_current_span(),