diff --git a/src/bot.py b/src/bot.py index 17a9af5..c03b51d 100644 --- a/src/bot.py +++ b/src/bot.py @@ -384,6 +384,7 @@ async def discussion_handler(): def shutdown(loop, signal=None): DBHandler.update_db() + db_cursor.close() if len(messagequeue) > 0: logger.warning("Some messages are still queued!") for task in asyncio.all_tasks(loop): diff --git a/src/wiki.py b/src/wiki.py index 0f9a1ad..23ca5a1 100644 --- a/src/wiki.py +++ b/src/wiki.py @@ -194,7 +194,6 @@ async def essential_info(change: dict, changed_categories, local_wiki: Wiki, tar rate_limiter: RateLimiter): """Prepares essential information for both embed and compact message format.""" _ = langs[target[0][0]]["wiki"].gettext - # recent_changes = RecentChangesClass() # TODO Look into replacing RecentChangesClass with local_wiki changed_categories = changed_categories.get(change["revid"], None) logger.debug("List of categories in essential_info: {}".format(changed_categories)) appearance_mode = embed_formatter if target[0][1] > 0 else compact_formatter