-
Notifications
You must be signed in to change notification settings - Fork 820
Commit
1) Add ability to enable all pairs using the new pair manager 2) Add abiity to enable/disable database subsystem via gRPC 3) Fix spelling mistakes
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -200,7 +200,13 @@ func LoadExchange(name string, useWG bool, wg *sync.WaitGroup) error { | |
} | ||
|
||
This comment has been minimized.
Sorry, something went wrong. |
||
if Bot.Settings.EnableAllPairs { | ||
This comment has been minimized.
Sorry, something went wrong.
nitsuaaisblink
|
||
exchCfg.EnabledPairs = exchCfg.AvailablePairs | ||
if exchCfg.CurrencyPairs != nil { | ||
assets := exchCfg.CurrencyPairs.GetAssetTypes() | ||
for x := range assets { | ||
pairs := exchCfg.CurrencyPairs.GetPairs(assets[x], false) | ||
exchCfg.CurrencyPairs.StorePairs(assets[x], pairs, true) | ||
} | ||
} | ||
} | ||
|
||
if Bot.Settings.EnableExchangeVerbose { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,7 @@ func GetSubsystemsStatus() map[string]bool { | |
systems["orders"] = Bot.OrderManager.Started() | ||
systems["portfolio"] = Bot.PortfolioManager.Started() | ||
systems["ntp_timekeeper"] = Bot.NTPManager.Started() | ||
This comment has been minimized.
Sorry, something went wrong. |
||
systems["database"] = Bot.DatabaseManager.Started() | ||
This comment has been minimized.
Sorry, something went wrong. |
||
systems["exchange_syncer"] = Bot.Settings.EnableExchangeSyncManager | ||
systems["grpc"] = Bot.Settings.EnableGRPC | ||
systems["grpc_proxy"] = Bot.Settings.EnableGRPCProxy | ||
|
@@ -103,6 +104,11 @@ func SetSubsystem(subsys string, enable bool) error { | |
return Bot.NTPManager.Start() | ||
} | ||
return Bot.NTPManager.Stop() | ||
This comment has been minimized.
Sorry, something went wrong.
nitsuaaisblink
|
||
case "database": | ||
if enable { | ||
return Bot.DatabaseManager.Start() | ||
} | ||
return Bot.DatabaseManager.Stop() | ||
case "exchange_syncer": | ||
if enable { | ||
Bot.ExchangeCurrencyPairManager.Start() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,9 +116,6 @@ func StartRPCServer() { | |
// StartRPCRESTProxy starts a gRPC proxy | ||
func StartRPCRESTProxy() { | ||
log.Debugf(log.GRPCSys, "gRPC proxy server support enabled. Starting gRPC proxy server on http://%v.\n", Bot.Config.RemoteControl.GRPC.GRPCProxyListenAddress) | ||
ctx := context.Background() | ||
This comment has been minimized.
Sorry, something went wrong. |
||
ctx, cancel := context.WithCancel(ctx) | ||
defer cancel() | ||
|
||
targetDir := utils.GetTLSDir(Bot.Settings.DataDir) | ||
creds, err := credentials.NewClientTLSFromFile(filepath.Join(targetDir, "cert.pem"), "") | ||
|
@@ -134,9 +131,11 @@ func StartRPCRESTProxy() { | |
Password: Bot.Config.RemoteControl.Password, | ||
}), | ||
} | ||
err = gctrpc.RegisterGoCryptoTraderHandlerFromEndpoint(ctx, mux, Bot.Config.RemoteControl.GRPC.ListenAddress, opts) | ||
err = gctrpc.RegisterGoCryptoTraderHandlerFromEndpoint(context.Background(), | ||
This comment has been minimized.
Sorry, something went wrong.
nitsuaaisblink
|
||
mux, Bot.Config.RemoteControl.GRPC.ListenAddress, opts) | ||
if err != nil { | ||
log.Errorf(log.GRPCSys, "Failed to register gRPC proxy. Err: %s\n", err) | ||
return | ||
} | ||
|
||
go func() { | ||
|
@@ -568,7 +567,7 @@ func (s *RPCServer) GetForexProviders(ctx context.Context, r *gctrpc.GetForexPro | |
Name: providers[x].Name, | ||
Enabled: providers[x].Enabled, | ||
Verbose: providers[x].Verbose, | ||
RestRollingDelay: providers[x].RESTPollingDelay.String(), | ||
RestPollingDelay: providers[x].RESTPollingDelay.String(), | ||
ApiKey: providers[x].APIKey, | ||
ApiKeyLevel: int64(providers[x].APIKeyLvl), | ||
PrimaryProvider: providers[x].PrimaryProvider, | ||
|
Large diffs are not rendered by default.
engine/exchange.go