Revision: 7867 Author: btongminh Date: 2010-01-09 20:01:18 +0000 (Sat, 09 Jan 2010)
Log Message: ----------- Using the fast server instead of the regular one. Temporary measure until somebody implements GU api :)
Modified Paths: -------------- trunk/pywikipedia/commonsdelinker/checkusage.py trunk/pywikipedia/commonsdelinker/delinker.py
Modified: trunk/pywikipedia/commonsdelinker/checkusage.py =================================================================== --- trunk/pywikipedia/commonsdelinker/checkusage.py 2010-01-08 15:58:57 UTC (rev 7866) +++ trunk/pywikipedia/commonsdelinker/checkusage.py 2010-01-09 20:01:18 UTC (rev 7867) @@ -216,8 +216,8 @@
class CheckUsage(object): def __init__(self, limit = 100, - mysql_default_server = 3, mysql_host_prefix = 'sql-s', mysql_kwargs = {}, - no_db = False, use_autoconn = False, + mysql_default_server = 3, mysql_host_prefix = 'sql-s', mysql_host_suffix = '', + mysql_kwargs = {}, no_db = False, use_autoconn = False,
http_retry_timeout = 30, http_max_retries = -1, http_callback = lambda *args: None, @@ -262,7 +262,7 @@ cursor.execute('SELECT dbname, domain, server FROM toolserver.wiki ORDER BY size DESC LIMIT %s', (limit, )) for dbname, domain, server in cursor.fetchall(): if server not in self.servers: - self.servers[server] = self.connect_mysql(mysql_host_prefix + str(server)) + self.servers[server] = self.connect_mysql(mysql_host_prefix + str(server) + mysql_host_suffix)
# FIXME: wikimediafoundation! # TODO: This is one big mess
Modified: trunk/pywikipedia/commonsdelinker/delinker.py =================================================================== --- trunk/pywikipedia/commonsdelinker/delinker.py 2010-01-08 15:58:57 UTC (rev 7866) +++ trunk/pywikipedia/commonsdelinker/delinker.py 2010-01-09 20:01:18 UTC (rev 7867) @@ -477,7 +477,8 @@ mysql_kwargs = config['sql_config'], use_autoconn = True, http_callback = wait_callback, - mysql_callback = wait_callback) + mysql_callback = wait_callback, + mysql_host_suffix = '-fast') else: self.CheckUsage = checkusage.CheckUsage(sys.maxint, http_callback = wait_callback, no_db = True)
pywikipedia-svn@lists.wikimedia.org