mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2026-04-28 03:30:10 +00:00
feat: NAT egress proxy for webhook delivery via static IPs (#5392)
This commit is contained in:
parent
e49a84daa9
commit
49e2bbd7b1
5 changed files with 62 additions and 27 deletions
|
|
@ -12,7 +12,6 @@ from datetime import UTC, datetime, timedelta
|
|||
from hashlib import sha256
|
||||
from typing import Any, Literal, cast
|
||||
|
||||
import httpx
|
||||
import structlog
|
||||
from sqlalchemy.exc import IntegrityError, SQLAlchemyError
|
||||
|
||||
|
|
@ -4576,13 +4575,14 @@ class WorkflowService:
|
|||
headers=signed_data.headers,
|
||||
)
|
||||
try:
|
||||
async with httpx.AsyncClient() as client:
|
||||
resp = await client.post(
|
||||
url=workflow_run.webhook_callback_url,
|
||||
data=signed_data.signed_payload,
|
||||
headers=signed_data.headers,
|
||||
timeout=httpx.Timeout(30.0),
|
||||
)
|
||||
resp = await app.AGENT_FUNCTION.deliver_webhook(
|
||||
url=workflow_run.webhook_callback_url,
|
||||
payload=signed_data.signed_payload,
|
||||
headers=signed_data.headers,
|
||||
timeout_seconds=30.0,
|
||||
organization_id=workflow_run.organization_id,
|
||||
run_id=workflow_run.workflow_run_id,
|
||||
)
|
||||
if resp.status_code >= 200 and resp.status_code < 300:
|
||||
LOG.info(
|
||||
"Webhook sent successfully",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue