diff --git a/src/bot.py b/src/bot.py index 2b26a43..e4e6eb0 100644 --- a/src/bot.py +++ b/src/bot.py @@ -151,7 +151,7 @@ class RcQueue: full = set() async with db.pool().acquire() as connection: async with connection.transaction(): - async for db_wiki in connection.cursor('SELECT DISTINCT wiki, row_number() over (ORDER BY webhook) AS ROWID, webhook, lang, display, rcid FROM rcgcdw WHERE rcid != -1 OR rcid IS NULL order by webhook'): + async for db_wiki in connection.cursor('SELECT DISTINCT wiki, row_number() OVER (ORDER BY webhook) AS rowid, webhook, lang, display, rcid FROM rcgcdw WHERE rcid != -1 OR rcid IS NULL ORDER BY webhook'): domain = get_domain(db_wiki["wiki"]) try: if db_wiki["wiki"] not in all_wikis: diff --git a/src/database.py b/src/database.py index 86cb293..190ec4f 100644 --- a/src/database.py +++ b/src/database.py @@ -19,6 +19,7 @@ class db_connection: logger.debug("Database connection established! Connection: {}".format(self.connection)) async def shutdown_connection(self): + logger.debug("Shutting down database connection...") await self.connection.close() def pool(self) -> asyncpg.Pool: