in src/main/scala/com/twitter/iago/util/ParrotCluster.scala [171:182]
private[this] def updateParrots(hostSet: ImmutableSet[ServiceInstance]) {
hostSet.asScala.foreach { instance =>
val endpoint = instance.getServiceEndpoint
if (instance.getStatus == Status.STOPPING && !isPaused(endpoint)) {
pauseParrot(endpoint)
} else if (instance.getStatus == Status.ALIVE && isPaused(endpoint)) {
resumeParrot(endpoint)
} else {
updateParrotMembership(endpoint)
}
}
}