mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
bbgo: register onShutdown from the trader
This commit is contained in:
parent
76b0f5518d
commit
77ca1a9c75
|
@ -221,8 +221,7 @@ func (trader *Trader) RunSingleExchangeStrategy(ctx context.Context, strategy Si
|
||||||
}
|
}
|
||||||
|
|
||||||
if shutdown, ok := strategy.(StrategyShutdown); ok {
|
if shutdown, ok := strategy.(StrategyShutdown); ok {
|
||||||
// Register the shutdown callback
|
trader.gracefulShutdown.OnShutdown(shutdown.Shutdown)
|
||||||
OnShutdown(shutdown.Shutdown)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return strategy.Run(ctx, orderExecutor, session)
|
return strategy.Run(ctx, orderExecutor, session)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user