mirror: Drop unused function
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 22 Oct 2017 22:23:42 +0000 (23:23 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 22 Oct 2017 22:23:42 +0000 (23:23 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/mirrors.py

index 5b6f76b..aefa786 100644 (file)
@@ -43,21 +43,6 @@ class Mirrors(base.Object):
 
                return mirror
 
-       def get_random(self, limit=None):
-               query = "SELECT id FROM mirrors WHERE status = 'enabled' ORDER BY RAND()"
-               args  = []
-
-               if limit:
-                       query += " LIMIT %s"
-                       args.append(limit)
-
-               mirrors = []
-               for mirror in self.db.query(query, *args):
-                       mirror = Mirror(self.pakfire, mirror.id)
-                       mirrors.append(mirror)
-
-               return mirrors
-
        def get_by_id(self, id):
                return self._get_mirror("SELECT * FROM mirrors WHERE id = %s", id)