Skip to content

Commit 9647f82

Browse files
committed
Update k8s_uploader.py
1 parent 188855d commit 9647f82

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

scripts/k8s_uploader.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,20 +170,25 @@ def trigger_indexing(
170170
"""Trigger indexing via the MCP indexer server."""
171171
print(f"Triggering indexing for {repo_path}")
172172

173-
# Build Python command to call qdrant_index_root via MCP server
173+
# Build Python command to call qdrant_index via MCP server
174+
# Use qdrant_index with subdir parameter to index specific repo
174175
python_cmd = f"""
175176
import sys
176177
sys.path.insert(0, '/app')
177-
from scripts.mcp_indexer_server import qdrant_index_root
178+
from scripts.mcp_indexer_server import qdrant_index
178179
import asyncio
179180
import json
180-
import os
181181
182-
# Set working directory to the uploaded repo
183-
os.chdir('{repo_path}')
182+
# Extract subdir from repo_path (e.g., /work/test-repo -> test-repo)
183+
repo_path = '{repo_path}'
184+
if repo_path.startswith('/work/'):
185+
subdir = repo_path[6:] # Remove '/work/' prefix
186+
else:
187+
subdir = repo_path
184188
185189
# Call indexing
186-
result = asyncio.run(qdrant_index_root(
190+
result = asyncio.run(qdrant_index(
191+
subdir=subdir,
187192
recreate={str(recreate)},
188193
collection={repr(collection) if collection else 'None'}
189194
))

0 commit comments

Comments
 (0)