Page MenuHomePhabricator

[Abstract Wikipedia data science] Modify code to make it usable from both Toolforge and outside environment
Closed, ResolvedPublic

Description

Description

For now, all the fetchers are written in a way that they are correctly working only in Toolforge environment (as they fetch a lot of information from database replicas). It would be useful to provide an opportunity for working with it from outer environment. This could be done as Toolforge allows ssh tunneling.

So the idea is basically look for a special flag on launching the program. If it exists, get opened ports (we need two ports - for analytics and for tools databases) to different databases from command line and use something like
conn = pymysql.connect(host='127.0.0.1', port = port1, user=user, db=db, password=pass)