mirror of
https://github.com/StanGirard/quivr.git
synced 2024-11-23 12:26:03 +03:00
fix: 🐛 crawl (#2076)
notification id issue when not in chat fixed # Description Please include a summary of the changes and the related issue. Please also include relevant motivation and context. ## Checklist before requesting a review Please delete options that are not relevant. - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented hard-to-understand areas - [ ] I have ideally added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged ## Screenshots (if appropriate):
This commit is contained in:
parent
45e9a1a10e
commit
ae81afbef5
@ -56,14 +56,14 @@ async def crawl_endpoint(
|
||||
"type": "error",
|
||||
}
|
||||
else:
|
||||
crawl_notification = None
|
||||
crawl_notification_id = None
|
||||
if chat_id:
|
||||
crawl_notification = notification_service.add_notification(
|
||||
crawl_notification_id = notification_service.add_notification(
|
||||
CreateNotificationProperties(
|
||||
action="CRAWL",
|
||||
chat_id=chat_id,
|
||||
status=NotificationsStatusEnum.Pending,
|
||||
)
|
||||
).id
|
||||
)
|
||||
|
||||
knowledge_to_add = CreateKnowledgeProperties(
|
||||
@ -78,7 +78,7 @@ async def crawl_endpoint(
|
||||
process_crawl_and_notify.delay(
|
||||
crawl_website_url=crawl_website.url,
|
||||
brain_id=brain_id,
|
||||
notification_id=crawl_notification.id,
|
||||
notification_id=crawl_notification_id,
|
||||
)
|
||||
|
||||
return {"message": "Crawl processing has started."}
|
||||
|
Loading…
Reference in New Issue
Block a user