Skip to content

Commit

Permalink
Merge pull request #72 from depot/terminate-pending
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobwgillespie authored Sep 28, 2023
2 parents b490e68 + cad5798 commit ddf4424
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/aws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ async function reconcileMachine(state: Record<string, Instance>, machine: GetDes
}

if (machine.desiredState === GetDesiredStateResponse_MachineState.DELETED) {
if (currentState === GetDesiredStateResponse_MachineState.PENDING) return
// if (currentState === GetDesiredStateResponse_MachineState.PENDING) return
if (currentState === GetDesiredStateResponse_MachineState.DELETING) return
console.log(`Terminating instance ${machine.id} (${current.InstanceId})`)
await client.send(new TerminateInstancesCommand({InstanceIds: [current.InstanceId]}))
Expand Down

0 comments on commit ddf4424

Please sign in to comment.