Renaming resources

This commit is contained in:
samkul-swe 2025-11-22 19:19:00 -08:00
parent 6d19e0fad8
commit 121e2f0c0e
24 changed files with 117 additions and 273 deletions

View file

@ -602,8 +602,8 @@ async def _index_elasticsearch_documents(
)
@celery_app.task(name="index_webcrawler_urls", bind=True)
def index_webcrawler_urls_task(
@celery_app.task(name="index_crawled_urls", bind=True)
def index_crawled_urls_task(
self,
connector_id: int,
search_space_id: int,
@ -611,7 +611,7 @@ def index_webcrawler_urls_task(
start_date: str,
end_date: str,
):
"""Celery task to index Webcrawler Urls."""
"""Celery task to index Web page Urls."""
import asyncio
loop = asyncio.new_event_loop()
@ -619,7 +619,7 @@ def index_webcrawler_urls_task(
try:
loop.run_until_complete(
_index_webcrawler_urls(
_index_crawled_urls(
connector_id, search_space_id, user_id, start_date, end_date
)
)
@ -627,19 +627,19 @@ def index_webcrawler_urls_task(
loop.close()
async def _index_webcrawler_urls(
async def _index_crawled_urls(
connector_id: int,
search_space_id: int,
user_id: str,
start_date: str,
end_date: str,
):
"""Index Webcrawler Urls with new session."""
"""Index Web page Urls with new session."""
from app.routes.search_source_connectors_routes import (
run_webcrawler_indexing,
run_web_page_indexing,
)
async with get_celery_session_maker()() as session:
await run_webcrawler_indexing(
await run_web_page_indexing(
session, connector_id, search_space_id, user_id, start_date, end_date
)

View file

@ -77,7 +77,7 @@ async def _check_and_trigger_schedules():
index_luma_events_task,
index_notion_pages_task,
index_slack_messages_task,
index_webcrawler_urls_task
index_crawled_urls_task
)
# Map connector types to their tasks
@ -95,7 +95,7 @@ async def _check_and_trigger_schedules():
SearchSourceConnectorType.DISCORD_CONNECTOR: index_discord_messages_task,
SearchSourceConnectorType.LUMA_CONNECTOR: index_luma_events_task,
SearchSourceConnectorType.ELASTICSEARCH_CONNECTOR: index_elasticsearch_documents_task,
SearchSourceConnectorType.WEBCRAWLER_CONNECTOR: index_webcrawler_urls_task,
SearchSourceConnectorType.WEBCRAWLER_CONNECTOR: index_crawled_urls_task,
}
# Trigger indexing for each due connector