Skip to content

Commit cd74174

Browse files
committed
1 parent 21970a8 commit cd74174

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

internal/ankacloud/controller.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ const (
3535
StateTerminating InstanceState = "Terminating"
3636
StateTerminated InstanceState = "Terminated"
3737
StateError InstanceState = "Error"
38-
StatePushing InstanceState = "Pushing"
3938
)
4039

4140
type VM struct {
@@ -231,14 +230,6 @@ func (c *controller) GetInstanceByExternalId(ctx context.Context, externalId str
231230
}
232231
}
233232

234-
// If no instances are in good states, return the first non-terminated/error instance
235-
for _, instance := range matchingInstances {
236-
switch instance.State {
237-
case StatePushing:
238-
return instance, nil
239-
}
240-
}
241-
242233
// As a last resort, return the first matching instance (could be Error/Terminated)
243234
return matchingInstances[0], nil
244235
}

0 commit comments

Comments
 (0)