Skip to content
This repository has been archived by the owner on Aug 8, 2021. It is now read-only.

Commit

Permalink
Update bot.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ArpaAP committed Mar 11, 2020
1 parent d54a5de commit 347383a
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,16 +188,13 @@ async def secloop():

@tasks.loop(seconds=1)
async def dbrecon():
startdb = time.time()
try:
db.ping(reconnect=False)
except BaseException:
traceback.print_exc()
logger.warning('DB CONNECTION CLOSED. RECONNECTING...')
db.ping(reconnect=True)
logger.info('DB RECONNECT DONE.')
enddb = startdb = time.time()
print(enddb-startdb)

@client.event
async def on_guild_join(guild):
Expand Down

0 comments on commit 347383a

Please sign in to comment.