Files
upbit-trader/ecosystem.config.js
joungmin 6e0c4508fa refactor: MVC 구조 분리 + 미사용 파일 archive 정리
- tick_trader.py를 Controller로 축소, 로직을 3개 모듈로 분리:
  - core/signal.py: 시그널 감지, 지표 계산 (calc_vr, calc_atr, detect_signal)
  - core/order.py: Upbit 주문 실행 (매수/매도/취소/조회)
  - core/position_manager.py: 포지션 관리, DB sync, 복구, 청산 조건
- type hints, Google docstring, 구체적 예외 타입 적용
- 50줄 초과 함수 분리 (process_signal, restore_positions)
- 미사용 파일 58개 archive/ 폴더로 이동
- README.md 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 20:46:47 +09:00

60 lines
1.8 KiB
JavaScript

module.exports = {
apps: [
{
name: "upbit-trader",
script: "main.py",
interpreter: ".venv/bin/python3",
cwd: "/Users/joungmin/workspaces/upbit-trader",
out_file: "logs/pm2.log",
error_file: "logs/pm2-error.log",
log_date_format: "YYYY-MM-DD HH:mm:ss",
autorestart: true,
watch: false,
},
{
name: "tick-collector",
script: "daemons/tick_collector.py",
interpreter: ".venv/bin/python3",
cwd: "/Users/joungmin/workspaces/upbit-trader",
out_file: "logs/tick-collector.log",
error_file: "logs/tick-collector-error.log",
log_date_format: "YYYY-MM-DD HH:mm:ss",
autorestart: true,
watch: false,
},
{
name: "tick-trader",
script: "daemons/tick_trader.py",
interpreter: ".venv/bin/python3",
cwd: "/Users/joungmin/workspaces/upbit-trader",
out_file: "logs/tick-trader.log",
error_file: "logs/tick-trader-error.log",
log_date_format: "YYYY-MM-DD HH:mm:ss",
autorestart: true,
watch: false,
},
{
name: "state-sync",
script: "daemons/state_sync.py",
interpreter: ".venv/bin/python3",
cwd: "/Users/joungmin/workspaces/upbit-trader",
out_file: "logs/state-sync.log",
error_file: "logs/state-sync-error.log",
log_date_format: "YYYY-MM-DD HH:mm:ss",
autorestart: true,
watch: false,
},
{
name: "context-collector",
script: "daemons/context_collector.py",
interpreter: ".venv/bin/python3",
cwd: "/Users/joungmin/workspaces/upbit-trader",
out_file: "logs/context-collector.log",
error_file: "logs/context-collector-error.log",
log_date_format: "YYYY-MM-DD HH:mm:ss",
autorestart: true,
watch: false,
},
],
};