diff --git a/nanoclaude/Dockerfile b/nanoclaude/Dockerfile index dbb8192..ef7c52f 100644 --- a/nanoclaude/Dockerfile +++ b/nanoclaude/Dockerfile @@ -19,6 +19,8 @@ COPY infra/ ./infra/ # Ensure infra has its own dependencies (pydantic, asyncssh already in requirements) # Python path: /app is WORKDIR, so "from infra.core..." and "from tools..." both work +ENV PYTHONUNBUFFERED=1 + RUN mkdir -p /app/data EXPOSE 8100 diff --git a/nanoclaude/services/worker.py b/nanoclaude/services/worker.py index 1b32e51..e3c155b 100644 --- a/nanoclaude/services/worker.py +++ b/nanoclaude/services/worker.py @@ -254,9 +254,11 @@ async def run(job: Job) -> None: # --- 사전 라우팅 (키워드 기반, EXAONE 스킵) --- pre = _pre_route(job.message) classify_latency = 0 + print(f"[TRACE] Job {job.id} pre_route result: {pre}", flush=True) if pre: classification = pre + print(f"[TRACE] Job {job.id} PRE-ROUTED: {pre.get('tool','')}.{pre.get('operation','')}", flush=True) logger.info("Job %s pre-routed: %s.%s", job.id, pre.get("tool", ""), pre.get("operation", pre.get("action", ""))) else: # --- EXAONE 분류기 호출 --- @@ -289,6 +291,7 @@ async def run(job: Job) -> None: response_text = classification.get("response", "") route_prompt = classification.get("prompt", "") + print(f"[TRACE] Job {job.id} final action='{action}' classification={classification}", flush=True) logger.info("Job %s classified as '%s'", job.id, action) # 대화 기록: 사용자 메시지