진단 로그 강화: 서버 전략 목록·live설정 확인
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -80,7 +80,9 @@ export async function resolveNotificationStrategy(
|
||||
const normalizedId = normalizeStrategyId(strategyId);
|
||||
// prefetched가 빈 배열이면 직접 API로 재시도 (백엔드 미준비 시 prefetch가 빈 채로 캐시될 수 있음)
|
||||
const list = (prefetched != null && prefetched.length > 0) ? prefetched : await getStrategiesList();
|
||||
console.debug('[resolveStrategy] id=%s name=%s listSize=%d', normalizedId, strategyName, list.length);
|
||||
console.debug('[resolveStrategy] id=%s name=%s listSize=%d list=%s',
|
||||
normalizedId, strategyName, list.length,
|
||||
list.slice(0, 5).map(s => `#${s.id}:${s.name?.substring(0, 20)}`).join(' | '));
|
||||
|
||||
if (normalizedId != null) {
|
||||
const fromList = list.find(s => s.id === normalizedId);
|
||||
@@ -118,15 +120,16 @@ export async function resolveNotificationStrategy(
|
||||
if (normalizedMarket) {
|
||||
try {
|
||||
const live = await loadLiveStrategySettings(normalizedMarket);
|
||||
const liveId = normalizeStrategyId(live.strategyId);
|
||||
const liveId = normalizeStrategyId(live?.strategyId);
|
||||
console.debug('[resolveStrategy] liveSettings %s → strategyId=%s', normalizedMarket, liveId);
|
||||
if (liveId != null) {
|
||||
const loaded = await loadStrategyForNotification(liveId);
|
||||
if (loaded) {
|
||||
return { strategy: loaded, strategyId: liveId };
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
/* ignore */
|
||||
} catch (e) {
|
||||
console.debug('[resolveStrategy] liveSettings error:', e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user