Add configurable ArchiveDirectory

This commit is contained in:
Matthew Penner
2020-04-04 00:17:32 -06:00
parent 3dba11ac6f
commit c096d8802f
4 changed files with 32 additions and 5 deletions

View File

@@ -6,7 +6,6 @@ import (
"github.com/imdario/mergo"
"github.com/pkg/errors"
"go.uber.org/zap"
"os"
)
// Merges data passed through in JSON form into the existing server object.
@@ -101,12 +100,20 @@ func (s *Server) runBackgroundActions() {
if server.Suspended && server.State != ProcessOfflineState {
zap.S().Infow("server suspended with running process state, terminating now", zap.String("server", server.Uuid))
if err := server.Environment.Terminate(os.Kill); err != nil {
/*if err := server.Environment.Terminate(os.Kill); err != nil {
zap.S().Warnw(
"failed to terminate server environment after seeing suspension",
zap.String("server", server.Uuid),
zap.Error(err),
)
}*/
if err := server.Environment.WaitForStop(10, true); err != nil {
zap.S().Warnw(
"failed to stop server environment after seeing suspension",
zap.String("server", server.Uuid),
zap.Error(err),
)
}
}
}(s)