fix: recover transient stock history failures within bounded deadlines

This commit is contained in:
2026-10-09 23:20:23 +08:00
parent c8c61d29bf
commit 2acfc64d58
6 changed files with 85 additions and 6 deletions
+3
View File
@@ -90,6 +90,9 @@ func (s *MarketService) History(ctx context.Context, u model.User, symbol, excha
return model.MarketHistory{}, e
}
result, e := s.adapter.History(ctx, c, symbol, exchange, start, end)
if e != nil && ctx.Err() == nil {
result, e = s.adapter.History(ctx, c, symbol, exchange, start, end)
}
if e != nil {
return result, apperror.ErrUnavailable
}