수정본
Some checks failed
CI/CD Pipeline / test-backend (push) Has been cancelled
CI/CD Pipeline / test-frontend (push) Has been cancelled
CI/CD Pipeline / build-and-push (push) Has been cancelled

This commit is contained in:
2026-03-27 14:47:49 +09:00
parent 844ee8944f
commit c818810667
25 changed files with 2708 additions and 266 deletions

View File

@@ -4,6 +4,7 @@ Strategy Manager
전략 등록·실행·관리를 담당하는 오케스트레이터
"""
from typing import Dict, List, Optional, Any
from collections import deque
import logging
import asyncio
from datetime import datetime
@@ -27,7 +28,7 @@ class StrategyManager:
def __init__(self):
self.strategies: Dict[str, BaseStrategy] = {} # 전략 등록부
self.priority_order: List[str] = [] # 우선순위
self.signal_history: List[Signal] = [] # 신호 이력
self.signal_history: deque = deque(maxlen=1000) # 신호 이력 (최대 1000건, 메모리 누수 방지)
logger.info("🎯 StrategyManager 초기화")
@@ -222,7 +223,7 @@ class StrategyManager:
Returns:
Signal 목록
"""
history = self.signal_history[:]
history = list(self.signal_history)
if stock_code:
history = [s for s in history if s.stock_code == stock_code]