From 9ec5514dd6e0bbc70ef8dad40d116c849cb2a225 Mon Sep 17 00:00:00 2001 From: Noah <117038300+NoahCxrest@users.noreply.github.com> Date: Wed, 13 Nov 2024 09:39:54 -0700 Subject: [PATCH] logging --- erm.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erm.py b/erm.py index a4a5339a..993987da 100644 --- a/erm.py +++ b/erm.py @@ -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) @@ -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