Upload bugs solved: elim_dupl_res feature causes generation of a malformed content...
[living-lab-site.git] / cis / cis_lb / load_balancer / random_lb.py
index cbf9a48..f17d1bd 100644 (file)
@@ -1,9 +1,13 @@
 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