Last active
October 16, 2015 19:40
-
-
Save svalleru/70b033ee2a033d60979d to your computer and use it in GitHub Desktop.
InfiniteRoundRobin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| targets = ['serverA', 'serverB', 'serverC', 'serverD', 'serverE', 'serverF'] | |
| index = 0 | |
| while True: | |
| print targets[index] | |
| index = (index + 1) % len(targets) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment