Add transfer logging output (#77)

Co-authored-by: Dane Everitt <dane@daneeveritt.com>
This commit is contained in:
Matthew Penner
2020-12-25 14:32:41 -07:00
committed by GitHub
parent 901ab1157d
commit 5c78cb9ab3
16 changed files with 398 additions and 227 deletions

View File

@@ -61,6 +61,14 @@ func (s *Server) ExecutingPowerAction() bool {
// function rather than making direct calls to the start/stop/restart functions on the
// environment struct.
func (s *Server) HandlePowerAction(action PowerAction, waitSeconds ...int) error {
if s.IsInstalling() {
return ErrServerIsInstalling
}
if s.IsTransferring() {
return ErrServerIsTransferring
}
if s.powerLock == nil {
s.powerLock = semaphore.NewWeighted(1)
}