Slide 23
Slide 23 text
class Spin(Action):
def handle(self, sock, read_data, path, headers):
while True:
# Sleep first
eventlet.sleep(self.check_interval)
# Check for another action
action = self.balancer.resolve_host(self.host)
if not isinstance(action, Spin):
return action.handle(
sock, read_data, path, headers
)