Files
kis_bot/kis_backtest_web.service
Your Name 36a3e2b4a1 feat: Enhance trading system with new permanent subscription features and order book management
Changes:
- Added a new API endpoint for managing permanent subscriptions, allowing users to enable or disable subscriptions dynamically.
- Implemented a function to fill candle data from Kiwoom, ensuring that only relevant data is inserted into the database.
- Introduced a mechanism to handle master subscription states, improving the management of subscription statuses.
- Updated the database schema to include new fields for managing subscription states and order book filtering.

Impact:
- These enhancements improve the flexibility and reliability of the trading system, allowing for better management of subscriptions and order book data, while reducing the risk of data inconsistencies.

히스토리 align 제거 븅신같은 초기설계 아예 제거
진입모드에 구멍메움
호가진입을 켜도 호가가 안들어올때 호가 안보고 그냥 사버림
2026-08-15 23:01:14 +09:00

32 lines
1.1 KiB
Desktop File

[Unit]
Description=KIS Quant Backtest Web Dashboard
After=network.target
[Service]
Type=simple
User=hoon
# 루트 backtest_web.py 를 직접 실행해야 if __name__ == "__main__" 블록의 app.run() 이 동작함.
# (kis_trader/backtest/backtest_web.py 는 얇은 런처이므로 import 시점엔 Flask 가 안 뜸)
WorkingDirectory=/home/hoon/kis_bot
ExecStartPre=/bin/sh -c 'fuser -k 5050/tcp 2>/dev/null; sleep 1; true'
ExecStart=/home/hoon/kis_bot/.venv/bin/python /home/hoon/kis_bot/backtest_web.py
# kill 사고 재발 방지 — 어떤 시그널로 죽어도 재시작 (수동 systemctl stop 제외)
Restart=always
RestartSec=5
# 위 루프 방지: 10초 동안 5회 이상 재시작 시도하면 그만둠 (진짜 설정 오류인 경우)
StartLimitIntervalSec=60
StartLimitBurst=5
# Optuna 등 웹이 띄운 장시간 잡: 기본 KillMode=control-group 이면
# systemctl restart 시 자식(Optuna)까지 SIGTERM → trial 중단.
# process: 메인 backtest_web 만 종료 (웹 재시작 ≠ Optuna 중단)
KillMode=process
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target