Skip to content

Instantly share code, notes, and snippets.

@mayhem
Created April 14, 2021 10:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mayhem/5aa567dde3bd2a66f4355bd8668ae3b8 to your computer and use it in GitHub Desktop.
Save mayhem/5aa567dde3bd2a66f4355bd8668ae3b8 to your computer and use it in GitHub Desktop.
@@ -197,15 +197,14 @@ class TimescaleListenStore(ListenStore):
with conn.cursor() as curs:
try:
execute_values(curs, query, submit, template=None)
+ while True:
+ result = curs.fetchone()
+ if not result:
+ break
+ inserted_rows.append((result[0], result[1], result[2]))
except UntranslatableCharacter:
pass
- while True:
- result = curs.fetchone()
- if not result:
- break
- inserted_rows.append((result[0], result[1], result[2]))
-
conn.commit()
# So update the listen counts of the users cached in brainzutils cache.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment