summaryrefslogtreecommitdiff
path: root/api.py
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-02-27 15:22:58 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2017-02-27 15:22:58 +0100
commitf5a815e2f80217ca9420989fdbc176158ff11e21 (patch)
treefbac3d7a9937106be6bafd27cba77b77a59c2d3b /api.py
parent2a0d6028757600f9761d81bdd647b3b59cb47495 (diff)
downloadprocessor-f5a815e2f80217ca9420989fdbc176158ff11e21.tar.gz
processor-f5a815e2f80217ca9420989fdbc176158ff11e21.zip
fix raw processing to one instead of multiple records
Diffstat (limited to 'api.py')
-rw-r--r--api.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/api.py b/api.py
index bfce108..1163584 100644
--- a/api.py
+++ b/api.py
@@ -76,17 +76,18 @@ class Worker(object):
# fetch from raw, converted to format for web table
if table == "player":
# upsert under special conditions
- data = await srccon.fetchrow(
+ datas = await srccon.fetch(
query, object_id, explicit_player)
- if data["name"] == explicit_player:
+ for data in datas:
await self._playerinto(destcon, data,
- table,
- True)
+ table,
+ data["name"] == explicit_player)
else:
- data = await srccon.fetchrow(
+ datas = await srccon.fetch(
query, object_id)
- # insert processed result into web table
- await self._into(destcon, data, table)
+ for data in datas:
+ # insert processed result into web table
+ await self._into(destcon, data, table)
data = await srccon.fetchrow(
"DELETE FROM match WHERE id=$1", object_id)