optimizer: close config file handle

This commit is contained in:
c9s 2022-06-20 11:07:48 +08:00
parent 695d948097
commit 3a072181bc
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -45,6 +45,10 @@ func (e *LocalProcessExecutor) Execute(configJson []byte) (*backtest.SummaryRepo
return nil, err
}
if err := tf.Close(); err != nil {
return nil, err
}
c := exec.Command(e.Bin, "backtest", "--config", tf.Name(), "--output", e.OutputDir, "--subdir")
output, err := c.Output()
if err != nil {