summaryrefslogtreecommitdiff
path: root/api.py
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-03-19 11:58:41 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2017-03-19 11:58:41 +0100
commitb4640af2bc3d49026c77dd020e926bf5fc0a2db2 (patch)
tree8c8a54ad0e33dee23041658d400478c5bbaf1f6e /api.py
parent28c71a792b244bb87b5dc83263e3c3d0a0310676 (diff)
downloadcruncher-b4640af2bc3d49026c77dd020e926bf5fc0a2db2.tar.gz
cruncher-b4640af2bc3d49026c77dd020e926bf5fc0a2db2.zip
hero stats: update table names
Diffstat (limited to 'api.py')
-rw-r--r--api.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/api.py b/api.py
index 6c291a2..f2158ec 100644
--- a/api.py
+++ b/api.py
@@ -102,13 +102,13 @@ class Cruncher(joblib.worker.Worker):
for stat in stats:
stat_id = await self._con.fetchrow("""
- INSERT INTO stats(win_rate, pick_rate, cs_per_min, gold_per_min)
- VALUES($1, $2, $3)
- RETURNING stats.id
+ INSERT INTO hero_stats(win_rate, pick_rate, cs_per_min, gold_per_min)
+ VALUES($1, $2, $3, $4)
+ RETURNING hero_stats.id
""", stat["win_rate"], stat["pick_rate"], stat["cs_per_min"],
stat["gold_per_min"])
await self._con.fetch("""
- INSERT INTO hero_stats(hero_id, dimension_id, stats_id, computed_on)
+ INSERT INTO hero_dimension(hero_id, dimension_id, stats_id, computed_on)
VALUES($1, $2, $3, NOW())
""", stat["id"], dimension["id"],
stat_id["id"])