Add transfer logging output (#77)
Co-authored-by: Dane Everitt <dane@daneeveritt.com>
This commit is contained in:
@@ -144,7 +144,8 @@ func (s *Server) acquireInstallationLock() error {
|
||||
s.installer.sem = semaphore.NewWeighted(1)
|
||||
}
|
||||
|
||||
ctx, _ := context.WithTimeout(context.Background(), time.Second*10)
|
||||
ctx, cancel := context.WithTimeout(context.Background(), time.Second*10)
|
||||
defer cancel()
|
||||
|
||||
return s.installer.sem.Acquire(ctx, 1)
|
||||
}
|
||||
@@ -168,6 +169,14 @@ func (s *Server) IsInstalling() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (s *Server) IsTransferring() bool {
|
||||
return s.transferring.Get()
|
||||
}
|
||||
|
||||
func (s *Server) SetTransferring(state bool) {
|
||||
s.transferring.Set(state)
|
||||
}
|
||||
|
||||
// Removes the installer container for the server.
|
||||
func (ip *InstallationProcess) RemoveContainer() {
|
||||
err := ip.client.ContainerRemove(ip.context, ip.Server.Id()+"_installer", types.ContainerRemoveOptions{
|
||||
|
||||
Reference in New Issue
Block a user