Skip to content

Commit 2aba547

Browse files
committed
Short script to quickly update skill information for games missing it
1 parent ff1b7bd commit 2aba547

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

manager/mass_skill_update.py

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/python
2+
# Query the database for all games without player trueskill updates done and
3+
# attempt to fill them in
4+
import manager
5+
import MySQLdb
6+
7+
_unfilled_game_query = """
8+
select game_id from game_player where mu_after is null
9+
group by game_id;
10+
"""
11+
12+
def main():
13+
connection = manager.get_connection()
14+
cursor = connection.cursor(MySQLdb.cursors.DictCursor)
15+
16+
cursor.execute(_unfilled_game_query)
17+
results = cursor.fetchall()
18+
for row in results:
19+
manager.update_trueskill(row['game_id'])
20+
21+
if __name__ == "__main__":
22+
main()
23+

0 commit comments

Comments
 (0)