fix: recover transient stock history failures within bounded deadlines
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user