Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix: Fix remaining cache module references and Flask app context issue

LearningCircuitf5cd541cc746
diff --git a/.github/workflows/api-tests.yml b/.github/workflows/api-tests.yml
index c86d4b067f..2b556b3ff8 100644
--- a/.github/workflows/api-tests.yml
+++ b/.github/workflows/api-tests.yml
@@ -53,7 +53,7 @@ jobs:
pdm sync -d
# Verify the package is installed correctly
pdm run python -c "import local_deep_research; print('Package imported:', local_deep_research.__file__)"
- pdm run python -c "import local_deep_research.cache; print('Cache module imported successfully')"
+ pdm run python -c "import local_deep_research.memory_cache; print('Memory cache module imported successfully')"
- name: Start server for API unit tests
run: |
diff --git a/src/local_deep_research/web/services/socket_service.py b/src/local_deep_research/web/services/socket_service.py
index 6dc9558fe2..debe2ad2ee 100644
--- a/src/local_deep_research/web/services/socket_service.py
+++ b/src/local_deep_research/web/services/socket_service.py
@@ -2,7 +2,7 @@ from datetime import datetime
from threading import Lock
from typing import Any, NoReturn
-from flask import Flask, current_app, request
+from flask import Flask, request
from flask_socketio import SocketIO
from loguru import logger
@@ -45,6 +45,7 @@ class SocketIOService:
app: The app to bind this service to.
"""
+ self.__app = app # Store the Flask app reference
self.__socketio = SocketIO(
app,
cors_allowed_origins="*",
@@ -308,7 +309,7 @@ class SocketIOService:
"""
logger.info(f"Starting web server on {host}:{port} (debug: {debug})")
self.__socketio.run(
- current_app,
+ self.__app, # Use the stored Flask app reference
debug=debug,
host=host,
port=port,