Skip to content

Commit

Permalink
logging
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahCxrest authored Nov 13, 2024
1 parent 82fab78 commit 9ec5514
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions erm.py
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,7 @@ async def check_whitelisted_car():

@tasks.loop(seconds=120, reconnect=True)
async def iterate_prc_logs():
initial_time = time.time()
try:
all_settings = await bot.settings.db.find({'ERLC': {'$exists': True}}).to_list(None)

Expand Down Expand Up @@ -1030,6 +1031,9 @@ async def iterate_prc_logs():
except Exception as e:
print(f"Error in iterate_prc_logs: {e}")

end_time = time.time()
logging.warning(f"Event iterate_prc_logs took {end_time - initial_time} seconds")

@iterate_prc_logs.before_loop
async def anti_fetch_measure():
# This CANNOT be called in the main loop
Expand Down

0 comments on commit 9ec5514

Please sign in to comment.