mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-23 00:54:09 +00:00
Small stylistic change in SQL query + another debug statement
This commit is contained in:
parent
a2f1d54f39
commit
5a6345a3e0
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue