Compare commits
1 commit
main
...
fix-config
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a7ef5c1df |
1 changed files with 13 additions and 1 deletions
|
|
@ -535,7 +535,7 @@ class MonitorScreen(Screen):
|
||||||
self.operation_in_progress = False
|
self.operation_in_progress = False
|
||||||
|
|
||||||
async def _factory_reset_with_data_clear(self) -> AsyncIterator[tuple[bool, str]]:
|
async def _factory_reset_with_data_clear(self) -> AsyncIterator[tuple[bool, str]]:
|
||||||
"""Generator that stops services and clears opensearch data."""
|
"""Generator that stops services and clears opensearch data and config."""
|
||||||
# First stop all services
|
# First stop all services
|
||||||
async for success, message in self.container_manager.reset_services():
|
async for success, message in self.container_manager.reset_services():
|
||||||
yield success, message
|
yield success, message
|
||||||
|
|
@ -563,6 +563,18 @@ class MonitorScreen(Screen):
|
||||||
yield False, f"Error recreating opensearch-data directory: {e}"
|
yield False, f"Error recreating opensearch-data directory: {e}"
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# Clear config.yaml to reset provider settings and model selections
|
||||||
|
yield False, "Clearing configuration..."
|
||||||
|
config_path = Path(env_manager.config.openrag_config_path.replace("$HOME", str(Path.home()))).expanduser()
|
||||||
|
config_file = config_path / "config.yaml"
|
||||||
|
if config_file.exists():
|
||||||
|
try:
|
||||||
|
config_file.unlink()
|
||||||
|
yield True, "Configuration file removed"
|
||||||
|
except Exception as e:
|
||||||
|
yield False, f"Error removing config file: {e}"
|
||||||
|
return
|
||||||
|
|
||||||
yield True, "Factory reset completed successfully"
|
yield True, "Factory reset completed successfully"
|
||||||
|
|
||||||
def _check_flow_backups(self) -> bool:
|
def _check_flow_backups(self) -> bool:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue