This commit is contained in:
kbearXD 2024-03-27 14:22:22 +08:00
parent 553976449d
commit f42ef77296
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ import (
"github.com/c9s/bbgo/pkg/util" "github.com/c9s/bbgo/pkg/util"
) )
func (s *Strategy) runBackgrounTask(ctx context.Context) { func (s *Strategy) runBackgroundTask(ctx context.Context) {
s.logger.Info("run background task") s.logger.Info("run background task")
// recover active orders // recover active orders

View File

@ -328,7 +328,7 @@ func (s *Strategy) Run(ctx context.Context, _ bbgo.OrderExecutor, session *bbgo.
}) })
}) })
go s.runBackgrounTask(ctx) go s.runBackgroundTask(ctx)
bbgo.OnShutdown(ctx, func(ctx context.Context, wg *sync.WaitGroup) { bbgo.OnShutdown(ctx, func(ctx context.Context, wg *sync.WaitGroup) {
defer wg.Done() defer wg.Done()