mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-21 22:43:52 +00:00
xmaker: print config into bytes
This commit is contained in:
parent
f74ea33e53
commit
af71b5e4a5
|
@ -1,11 +1,11 @@
|
||||||
package xmaker
|
package xmaker
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"math"
|
"math"
|
||||||
"os"
|
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -387,7 +387,6 @@ func (s *Strategy) Initialize() error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s.PrintConfig(os.Stdout, true, false)
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1751,6 +1750,10 @@ func (s *Strategy) CrossRun(
|
||||||
) error {
|
) error {
|
||||||
instanceID := s.InstanceID()
|
instanceID := s.InstanceID()
|
||||||
|
|
||||||
|
configWriter := bytes.NewBuffer(nil)
|
||||||
|
s.PrintConfig(configWriter, true, false)
|
||||||
|
s.logger.Infof("config: %s", configWriter.String())
|
||||||
|
|
||||||
// configure sessions
|
// configure sessions
|
||||||
sourceSession, ok := sessions[s.SourceExchange]
|
sourceSession, ok := sessions[s.SourceExchange]
|
||||||
if !ok {
|
if !ok {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user