add webhook support for observer (#1546)
This commit is contained in:
@@ -1613,9 +1613,10 @@ class ForgeAgent:
|
||||
headers=headers,
|
||||
)
|
||||
try:
|
||||
resp = await httpx.AsyncClient().post(
|
||||
task.webhook_callback_url, data=payload, headers=headers, timeout=httpx.Timeout(30.0)
|
||||
)
|
||||
async with httpx.AsyncClient() as client:
|
||||
resp = await client.post(
|
||||
task.webhook_callback_url, data=payload, headers=headers, timeout=httpx.Timeout(30.0)
|
||||
)
|
||||
if resp.status_code == 200:
|
||||
LOG.info(
|
||||
"Webhook sent successfully",
|
||||
|
||||
Reference in New Issue
Block a user