Remove unused function ScaleAllEnvironments
This commit is contained in:

committed by
Maximilian Pass

parent
50a2a22b74
commit
66d04fde2a
@@ -56,9 +56,6 @@ type Manager interface {
|
|||||||
// The runner is deleted or cleaned up for reuse depending on the used executor.
|
// The runner is deleted or cleaned up for reuse depending on the used executor.
|
||||||
Return(r Runner) error
|
Return(r Runner) error
|
||||||
|
|
||||||
// ScaleAllEnvironments checks for all environments if enough runners are created.
|
|
||||||
ScaleAllEnvironments() error
|
|
||||||
|
|
||||||
// Load fetches all already created runners from the executor and registers them.
|
// Load fetches all already created runners from the executor and registers them.
|
||||||
// It should be called during the startup process (e.g. on creation of the Manager).
|
// It should be called during the startup process (e.g. on creation of the Manager).
|
||||||
Load()
|
Load()
|
||||||
@@ -213,16 +210,6 @@ func (m *NomadRunnerManager) Return(r Runner) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *NomadRunnerManager) ScaleAllEnvironments() error {
|
|
||||||
for _, environment := range m.environments.List() {
|
|
||||||
err := m.scaleEnvironment(environment.ID())
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("can not scale up: %w", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *NomadRunnerManager) Load() {
|
func (m *NomadRunnerManager) Load() {
|
||||||
for _, environment := range m.environments.List() {
|
for _, environment := range m.environments.List() {
|
||||||
environmentLogger := log.WithField("environmentID", environment.ID())
|
environmentLogger := log.WithField("environmentID", environment.ID())
|
||||||
|
@@ -97,17 +97,3 @@ func (_m *ManagerMock) Return(r Runner) error {
|
|||||||
|
|
||||||
return r0
|
return r0
|
||||||
}
|
}
|
||||||
|
|
||||||
// ScaleAllEnvironments provides a mock function with given fields:
|
|
||||||
func (_m *ManagerMock) ScaleAllEnvironments() error {
|
|
||||||
ret := _m.Called()
|
|
||||||
|
|
||||||
var r0 error
|
|
||||||
if rf, ok := ret.Get(0).(func() error); ok {
|
|
||||||
r0 = rf()
|
|
||||||
} else {
|
|
||||||
r0 = ret.Error(0)
|
|
||||||
}
|
|
||||||
|
|
||||||
return r0
|
|
||||||
}
|
|
||||||
|
Reference in New Issue
Block a user