Skip to content

Commit

Permalink
hotfix: sleep on webhook sending
Browse files Browse the repository at this point in the history
  • Loading branch information
chitalian committed Mar 4, 2025
1 parent b723bf1 commit 37f5c55
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions valhalla/jawn/src/lib/clients/webhookSender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ export async function sendToWebhook(
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), 2 * 60 * 1000);

// sleep for 30 seconds before sending the webhook to allow for the request to be logged in clickhouse
await new Promise((resolve) => setTimeout(resolve, 30_000));

try {
const response = await fetch(webhook.destination, {
method: "POST",
Expand Down

0 comments on commit 37f5c55

Please sign in to comment.