mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-23 00:54:09 +00:00
Close db
This commit is contained in:
parent
e82d985d8f
commit
8a9f3bb0d2
|
@ -9,7 +9,7 @@ from typing import Generator
|
||||||
from contextlib import asynccontextmanager
|
from contextlib import asynccontextmanager
|
||||||
from src.argparser import command_line_args
|
from src.argparser import command_line_args
|
||||||
from src.config import settings
|
from src.config import settings
|
||||||
from src.database import db_cursor
|
from src.database import db_cursor, db_connection
|
||||||
from src.exceptions import *
|
from src.exceptions import *
|
||||||
from src.misc import get_paths, get_domain
|
from src.misc import get_paths, get_domain
|
||||||
from src.msgqueue import messagequeue
|
from src.msgqueue import messagequeue
|
||||||
|
@ -384,7 +384,7 @@ async def discussion_handler():
|
||||||
|
|
||||||
def shutdown(loop, signal=None):
|
def shutdown(loop, signal=None):
|
||||||
DBHandler.update_db()
|
DBHandler.update_db()
|
||||||
db_cursor.close()
|
db_connection.close()
|
||||||
if len(messagequeue) > 0:
|
if len(messagequeue) > 0:
|
||||||
logger.warning("Some messages are still queued!")
|
logger.warning("Some messages are still queued!")
|
||||||
for task in asyncio.all_tasks(loop):
|
for task in asyncio.all_tasks(loop):
|
||||||
|
|
Loading…
Reference in a new issue