From c9815fd6fb78037629409dd25673807122514dc4 Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Sun, 28 Dec 2025 16:49:47 +0200 Subject: [PATCH] feat(celery): update Google Drive task for multiple folders - Accept comma-separated folder_ids and folder_names parameters - Pass through to indexing function for batch processing --- .../app/tasks/celery_tasks/connector_tasks.py | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/surfsense_backend/app/tasks/celery_tasks/connector_tasks.py b/surfsense_backend/app/tasks/celery_tasks/connector_tasks.py index 8e507915f..44f57d464 100644 --- a/surfsense_backend/app/tasks/celery_tasks/connector_tasks.py +++ b/surfsense_backend/app/tasks/celery_tasks/connector_tasks.py @@ -479,10 +479,10 @@ def index_google_drive_files_task( connector_id: int, search_space_id: int, user_id: str, - folder_id: str, - folder_name: str, + folder_ids: str, # Comma-separated folder IDs + folder_names: str, # Comma-separated folder names ): - """Celery task to index Google Drive files.""" + """Celery task to index Google Drive files from multiple folders.""" import asyncio loop = asyncio.new_event_loop() @@ -494,8 +494,8 @@ def index_google_drive_files_task( connector_id, search_space_id, user_id, - folder_id, - folder_name, + folder_ids, + folder_names, ) ) finally: @@ -506,10 +506,10 @@ async def _index_google_drive_files( connector_id: int, search_space_id: int, user_id: str, - folder_id: str, - folder_name: str, + folder_ids: str, # Comma-separated folder IDs + folder_names: str, # Comma-separated folder names ): - """Index Google Drive files with new session.""" + """Index Google Drive files from multiple folders with new session.""" from app.routes.search_source_connectors_routes import ( run_google_drive_indexing, ) @@ -520,8 +520,8 @@ async def _index_google_drive_files( connector_id, search_space_id, user_id, - folder_id, - folder_name, + folder_ids, + folder_names, )