Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jsun-m committed Dec 10, 2024
1 parent 242fe2a commit 847ca18
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions pkg/abstractions/common/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"github.com/beam-cloud/beta9/pkg/repository"
"github.com/beam-cloud/beta9/pkg/scheduler"
"github.com/beam-cloud/beta9/pkg/types"
"github.com/redis/go-redis/v9"
)

const IgnoreScalingEventInterval = 10 * time.Second
Expand Down Expand Up @@ -301,12 +300,8 @@ func (i *AutoscaledInstance) HandleDeploymentNotHealthy(stubId, currentState, re
var state string
state, err := i.ContainerRepo.GetStubUnhealthyState(stubId)
if err != nil {
if err != redis.Nil {
log.Printf("<%s> failed to get unhealthy state\n", i.Name)
return
}

state = types.StubStateHealthy
log.Printf("<%s> failed to get unhealthy state\n", i.Name)
return
}

if state == currentState {
Expand All @@ -325,10 +320,7 @@ func (i *AutoscaledInstance) HandleDeploymentNotHealthy(stubId, currentState, re
func (i *AutoscaledInstance) HandleDeploymentHealthy(stubId string) {
var state string
state, err := i.ContainerRepo.GetStubUnhealthyState(stubId)
if err != nil {
if err != redis.Nil {
log.Printf("<%s> failed to get unhealthy state\n", i.Name)
}
if err != nil || state == types.StubStateHealthy {
return
}

Expand Down

0 comments on commit 847ca18

Please sign in to comment.