mirror of
https://github.com/c9s/bbgo.git
synced 2024-09-20 08:11:08 +00:00
fix nil metrics error
This commit is contained in:
parent
c257bc8ccf
commit
243b90aaf9
|
@ -92,7 +92,9 @@ func syncActiveOrders(ctx context.Context, opts SyncActiveOrdersOpts) error {
|
|||
return errors.Wrapf(err, "[ActiveOrderRecover] failed to query open orders, skip this time")
|
||||
}
|
||||
|
||||
metricsNumOfOpenOrders.With(opts.metricsLabels).Set(float64(len(openOrders)))
|
||||
if metricsNumOfOpenOrders != nil {
|
||||
metricsNumOfOpenOrders.With(opts.metricsLabels).Set(float64(len(openOrders)))
|
||||
}
|
||||
|
||||
activeOrders := opts.activeOrderBook.Orders()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user