mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-23 00:54:09 +00:00
Various fixes based on recent crash
This commit is contained in:
parent
57c2b54b74
commit
71c2d4fd8c
|
@ -320,7 +320,7 @@ async def discussion_handler():
|
||||||
try:
|
try:
|
||||||
while True:
|
while True:
|
||||||
fetch_all = db_cursor.execute(
|
fetch_all = db_cursor.execute(
|
||||||
'SELECT wiki, wikiid, postid FROM rcgcdw WHERE wikiid IS NOT NULL')
|
'SELECT wiki, wikiid, rcid, postid FROM rcgcdw WHERE wikiid IS NOT NULL')
|
||||||
for db_wiki in fetch_all.fetchall():
|
for db_wiki in fetch_all.fetchall():
|
||||||
header = settings["header"]
|
header = settings["header"]
|
||||||
header["Accept"] = "application/hal+json"
|
header["Accept"] = "application/hal+json"
|
||||||
|
@ -441,7 +441,7 @@ async def main_loop():
|
||||||
await asyncio.gather(main_tasks["wiki_scanner"], main_tasks["discussion_handler"], main_tasks["message_sender"])
|
await asyncio.gather(main_tasks["wiki_scanner"], main_tasks["discussion_handler"], main_tasks["message_sender"])
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
shutdown(loop)
|
shutdown(loop)
|
||||||
except asyncio.exceptions.CancelledError:
|
except asyncio.CancelledError:
|
||||||
return
|
return
|
||||||
|
|
||||||
asyncio.run(main_loop(), debug=False)
|
asyncio.run(main_loop(), debug=False)
|
||||||
|
|
|
@ -113,7 +113,7 @@ async def generic_msg_sender_exception_logger(exception: str, title: str, **kwar
|
||||||
message = DiscordMessage("embed", "bot/exception", [None], wiki=None)
|
message = DiscordMessage("embed", "bot/exception", [None], wiki=None)
|
||||||
message["description"] = exception
|
message["description"] = exception
|
||||||
message["title"] = title
|
message["title"] = title
|
||||||
for key, value in kwargs:
|
for key, value in kwargs.items():
|
||||||
message.add_field(key, value)
|
message.add_field(key, value)
|
||||||
message.finish_embed()
|
message.finish_embed()
|
||||||
await send_to_discord_webhook_monitoring(message)
|
await send_to_discord_webhook_monitoring(message)
|
||||||
|
|
Loading…
Reference in a new issue