Skip to content

Commit

Permalink
Remove aws terminated instance checks for time being
Browse files Browse the repository at this point in the history
It isn't working at all and mis-identifies the systems as shutdown
  • Loading branch information
emperorcow committed Aug 6, 2015
1 parent 35eea2e commit 9f6ff37
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions plugins/resourcemanagers/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -582,24 +582,12 @@ func (this awsResourceManager) Keep() {
resourceID := data.Key
resource := data.Val.(resourceInfo)

//First, let's get the status of the resource
// 1. Let's get the status of the resource
status, err := getInstanceState(*resource.Instance.VPCID, this.ec2client)

// Set the state in our local data
resource.State = status

if status != INSTANCE_STATE_RUNNING && status != INSTANCE_STATE_PENDING {
err = this.DeleteResource(resourceID)
if err != nil {
log.WithFields(log.Fields{
"resourceid": resourceID,
"resourcemanager": "aws",
"error": err.Error(),
}).Error("Unable to remove stopped instance from the queue.")
continue
}
}

// 2. Let's check this resource and see if it's being used, if so, set the last use time
jobs := this.q.AllJobsByResource(resourceID)
if len(jobs) > 0 {
Expand Down

0 comments on commit 9f6ff37

Please sign in to comment.