quickfix: webhooks: ensure the 'crawl_reviewed' webhook is sent async, doesn't delay submitting a review (#2033)
make the call to `create_crawl_reviewed_notification` be called with create_task (similar to other user-initiated webhook events), to avoid extra wait for webhook to complete
This commit is contained in:
parent
7208888a1c
commit
86c9e538c1
@ -254,8 +254,13 @@ class BaseCrawlOps:
|
|||||||
if update_values.get("reviewStatus"):
|
if update_values.get("reviewStatus"):
|
||||||
crawl = BaseCrawl.from_dict(result)
|
crawl = BaseCrawl.from_dict(result)
|
||||||
|
|
||||||
await self.event_webhook_ops.create_crawl_reviewed_notification(
|
asyncio.create_task(
|
||||||
crawl.id, crawl.oid, crawl.reviewStatus, crawl.description
|
self.event_webhook_ops.create_crawl_reviewed_notification(
|
||||||
|
crawl.id,
|
||||||
|
crawl.oid,
|
||||||
|
crawl.reviewStatus,
|
||||||
|
crawl.description,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
return {"updated": True}
|
return {"updated": True}
|
||||||
|
Loading…
Reference in New Issue
Block a user