xmaker: add rate limit hit alert

This commit is contained in:
c9s 2022-01-11 22:48:28 +08:00
parent 081a143ec0
commit 940c675cae

View File

@ -524,6 +524,7 @@ func (s *Strategy) Hedge(ctx context.Context, pos fixedpoint.Value) {
if !s.hedgeErrorRateReservation.OK() { if !s.hedgeErrorRateReservation.OK() {
return return
} }
s.Notify("Hit hedge error rate limit, waiting...")
time.Sleep(s.hedgeErrorRateReservation.Delay()) time.Sleep(s.hedgeErrorRateReservation.Delay())
s.hedgeErrorRateReservation = nil s.hedgeErrorRateReservation = nil
} }