Beispiel #1
0
func moveOneContainerInDB(a *app.App, oldContainer container, newUnit provision.Unit) error {
	appDBMutex.Lock()
	defer appDBMutex.Unlock()
	err := a.AddUnitsToDB([]provision.Unit{newUnit})
	if err != nil {
		return err
	}
	return a.RemoveUnitFromDB(oldContainer.ID)
}
Beispiel #2
0
func moveOneContainerInDB(a *app.App, oldContainer container, newUnit provision.Unit) error {
	appDBMutex.Lock()
	defer appDBMutex.Unlock()
	return a.AddUnitsToDB([]provision.Unit{newUnit})
}