fix(dashboard): detect symbols from any bot_status key, not just last_start
The /api/symbols endpoint only returned symbols that had a :last_start key, which requires the log parser to catch the bot start log. If the dashboard was deployed after the bot started, the start log was already past the file position and symbols showed as 0. Now extracts symbols from any colon-prefixed key in bot_status. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -37,9 +37,9 @@ def get_symbols():
|
||||
"""활성 심볼 목록 반환."""
|
||||
with get_db() as db:
|
||||
rows = db.execute(
|
||||
"SELECT key FROM bot_status WHERE key LIKE '%:last_start'"
|
||||
"SELECT DISTINCT key FROM bot_status WHERE key LIKE '%:%'"
|
||||
).fetchall()
|
||||
symbols = [r["key"].split(":")[0] for r in rows]
|
||||
symbols = {r["key"].split(":")[0] for r in rows}
|
||||
return {"symbols": sorted(symbols)}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user