Skip to content

Commit

Permalink
Restart all Dogus that have changed config; #59
Browse files Browse the repository at this point in the history
There may be actions which do not trigger a Dogu restart,
so all Dogus with changed config will be restarted.
  • Loading branch information
robertauer committed Mar 6, 2024
1 parent 5dafad3 commit 8b0e339
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions pkg/application/doguRestartUseCase.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,7 @@ func getDogusThatNeedARestart(blueprintSpec *domain.BlueprintSpec) []common.Qual
dogusInEffectiveBlueprint := blueprintSpec.EffectiveBlueprint.Dogus
for _, dogu := range dogusInEffectiveBlueprint {
if blueprintSpec.StateDiff.DoguConfigDiffs[dogu.Name.SimpleName].HasChanges() {
// only restart Dogu if config changed and action is none
// if action is not none, the Dogu is already restarted
for _, diff := range blueprintSpec.StateDiff.DoguDiffs {
if diff.DoguName == dogu.Name.SimpleName && diff.NeededAction == domain.ActionNone {
dogusThatNeedRestart = append(dogusThatNeedRestart, dogu.Name)
break
}
}
dogusThatNeedRestart = append(dogusThatNeedRestart, dogu.Name)
}
}
return dogusThatNeedRestart
Expand Down

0 comments on commit 8b0e339

Please sign in to comment.