수정본
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user