use transaction
@@ -142,11 +142,13 @@ class Database(commands.Cog):
async def mass_fetch_balances(self):
async with self.db.acquire() as con:
+ async with con.transaction():
async for record in con.cursor('SELECT uid, emeralds FROM users'):
yield record
async def mass_fetch_votestreaks(self):
async with self.db.acquire() as con:
+ async with con.transaction():
async for record in con.cursor('SELECT uid, vote_streak FROM users'):
yield record
