mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-24 07:55:07 +01:00
Configure processors too on calling /update API
- Previously only search was being reconfigured - But Processors are configured on app start too - Match that behavior on calling /update API
This commit is contained in:
parent
9d31988f42
commit
ce945f7a90
1 changed files with 5 additions and 2 deletions
|
@ -8,7 +8,7 @@ from typing import Optional
|
|||
from fastapi import APIRouter
|
||||
|
||||
# Internal Packages
|
||||
from src.configure import configure_search
|
||||
from src.configure import configure_processor, configure_search
|
||||
from src.search_type import image_search, text_search
|
||||
from src.utils.rawconfig import FullConfig, SearchResponse
|
||||
from src.utils.config import SearchType
|
||||
|
@ -130,4 +130,7 @@ def update(t: Optional[SearchType] = None, force: Optional[bool] = False):
|
|||
state.search_index_lock.release()
|
||||
logger.info("Search Index updated via API call")
|
||||
|
||||
return {'status': 'ok', 'message': 'index updated'}
|
||||
state.processor_config = configure_processor(state.config.processor)
|
||||
logger.info("Processor reconfigured via API call")
|
||||
|
||||
return {'status': 'ok', 'message': 'khoj reloaded'}
|
||||
|
|
Loading…
Reference in a new issue