mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-23 15:10:15 +00:00
Feature: Faster start & stop times (#648)
* Updates starting and stopping routines to be a bit more parallel with less waiting required * Removes stop, removes debugging output * linting and test fixes * Add extra kill switch for exiting on exchange loading delay * Fixes fun math * breaks loop instead of switch. Moves param warns higher * Removes unceccary gos. passes in cfg to remove data race * Removes os signal processing. Fixes bad master merge
This commit is contained in:
@@ -396,17 +396,16 @@ func (bot *Engine) Start() error {
|
||||
}
|
||||
|
||||
gctlog.Debugln(gctlog.Global, "Setting up exchanges..")
|
||||
bot.SetupExchanges()
|
||||
if bot.exchangeManager.Len() == 0 {
|
||||
return errors.New("no exchanges are loaded")
|
||||
err := bot.SetupExchanges()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if bot.Settings.EnableCommsRelayer {
|
||||
if err := bot.CommsManager.Start(); err != nil {
|
||||
if err = bot.CommsManager.Start(); err != nil {
|
||||
gctlog.Errorf(gctlog.Global, "Communications manager unable to start: %v\n", err)
|
||||
}
|
||||
}
|
||||
var err error
|
||||
if bot.Settings.EnableCoinmarketcapAnalysis ||
|
||||
bot.Settings.EnableCurrencyConverter ||
|
||||
bot.Settings.EnableCurrencyLayer ||
|
||||
@@ -556,6 +555,7 @@ func (bot *Engine) Stop() {
|
||||
gctlog.Errorf(gctlog.DispatchMgr, "Dispatch system unable to stop. Error: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
if bot.Settings.EnableCoinmarketcapAnalysis ||
|
||||
bot.Settings.EnableCurrencyConverter ||
|
||||
bot.Settings.EnableCurrencyLayer ||
|
||||
|
||||
Reference in New Issue
Block a user