import random
from base import LoadBalancer
-import config
class RandomLoadBalancer(LoadBalancer):
- def choose(self):
- return config.CIS_URLS[random.randint(0, len(config.CIS_URLS) - 1)]
\ No newline at end of file
+ def choose(self, urls):
+ index = random.randint(0, len(urls) - 1)
+ cis = urls[index]
+
+ del(urls[index])
+
+ return cis
\ No newline at end of file