mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
engine: GetSubsystemsStatus fix (#773)
* engine: GetSubsystemsStatus fix * engine: force map literal to stop doubling up on keys, expanded test coverage * engine: Deploy default for migration requirement. * glorious: nits addr * glorious: suggestion * tests: fix
This commit is contained in:
@@ -15,6 +15,8 @@ const (
|
||||
Name = "gctscript"
|
||||
)
|
||||
|
||||
var ErrNilSubsystem = errors.New("gct script has not been set up")
|
||||
|
||||
// GctScriptManager loads and runs GCT Tengo scripts
|
||||
type GctScriptManager struct {
|
||||
config *Config
|
||||
@@ -61,6 +63,9 @@ func (g *GctScriptManager) Start(wg *sync.WaitGroup) (err error) {
|
||||
|
||||
// Stop stops gctscript subsystem along with all running Virtual Machines
|
||||
func (g *GctScriptManager) Stop() error {
|
||||
if g == nil {
|
||||
return fmt.Errorf("%s %w", caseName, ErrNilSubsystem)
|
||||
}
|
||||
if atomic.LoadInt32(&g.started) == 0 {
|
||||
return fmt.Errorf("%s not running", caseName)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user