diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-02-27 15:22:58 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-02-27 15:22:58 +0100 |
| commit | f5a815e2f80217ca9420989fdbc176158ff11e21 (patch) | |
| tree | fbac3d7a9937106be6bafd27cba77b77a59c2d3b | |
| parent | 2a0d6028757600f9761d81bdd647b3b59cb47495 (diff) | |
| download | shrinker-f5a815e2f80217ca9420989fdbc176158ff11e21.tar.gz shrinker-f5a815e2f80217ca9420989fdbc176158ff11e21.zip | |
fix raw processing to one instead of multiple records
| -rw-r--r-- | api.py | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -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) |
