Fix/memory mcp2 1 (#145)

* 去掉MCP框架,重构

* 去掉MCP框架,重构

* 去掉MCP框架,重构

* 去掉MCP框架,重构

* 去掉MCP框架,重构

* 去掉MCP框架,重构

* 去掉MCP框架,重构

* feat(celery): add comprehensive logging to worker and write task

- Initialize logging system in Celery worker entry point with LoggingConfig
- Add logger instance and startup message to celery_worker.py
- Reorganize imports in tasks.py for better readability and consistency
- Add detailed logging to write_message_task for debugging and monitoring
- Log task start with group_id, config_id, and storage_type parameters
- Log service execution and completion status with results
- Add exception handling with error logging and stack trace capture
- Log task completion time and Celery task ID for performance tracking
- Improves observability and troubleshooting of async task execution

* 去掉MCP框架,重构

* 去掉MCP框架,重构

---------

Co-authored-by: Ke Sun <kesun5@illinois.edu>
This commit is contained in:
lixinyue11
2026-01-20 10:36:30 +08:00
committed by GitHub
parent 75c1892611
commit 642587fc97
62 changed files with 3128 additions and 4585 deletions

View File

@@ -1,32 +1,5 @@
version: '3.9'
services:
# MCP Server - standalone service
mcp-server:
image: redbear-mem-open:latest
container_name: mcp-server
ports:
- "8081:8081" # MCP server port
env_file:
- .env
environment:
- SERVER_IP=0.0.0.0 # Bind to all interfaces
volumes:
- ./files:/files
- /etc/localtime:/etc/localtime:ro
command: python -m app.core.memory.agent.mcp_server.server
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8081/sse')"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
restart: unless-stopped
networks:
- default
- celery
# FastAPI application - connects to MCP server
# FastAPI application
api:
image: redbear-mem-open:latest
container_name: api
@@ -35,37 +8,31 @@ services:
env_file:
- .env
environment:
- MCP_SERVER_URL=http://mcp-server:8081 # Back to using container name
- SERVER_IP=0.0.0.0 # Ensure MCP server binds to all interfaces
- SERVER_IP=0.0.0.0
# 如果代码里必须要 MCP_SERVER_URL可以先注释或指向占位
# - MCP_SERVER_URL=
volumes:
- ./files:/files
- /etc/localtime:/etc/localtime:ro
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload --log-level debug
depends_on:
mcp-server:
condition: service_healthy
restart: unless-stopped
networks:
- default
- celery
# Celery worker - connects to MCP server
# Celery worker
worker:
image: redbear-mem-open:latest
container_name: worker
env_file:
- .env
environment:
- MCP_SERVER_URL=http://mcp-server:8081 # Back to using container name
volumes:
- ./files:/files
- /etc/localtime:/etc/localtime:ro
command: celery -A app.celery_worker.celery_app worker --loglevel=info
depends_on:
mcp-server:
condition: service_healthy
restart: unless-stopped
networks:
- celery
networks:
celery:
celery: