From 059ff9b3bb7c2f6890da024b8c3d0069d145d03c Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Tue, 24 Jun 2025 09:04:56 -0700 Subject: [PATCH] clean up logs --- app/dao/jobs_dao.py | 6 +++--- app/dao/notifications_dao.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/dao/jobs_dao.py b/app/dao/jobs_dao.py index 2e479a77d..171522d6c 100644 --- a/app/dao/jobs_dao.py +++ b/app/dao/jobs_dao.py @@ -157,17 +157,17 @@ def dao_create_job(job): orig_time = job.created_at now_time = utc_now() diff_time = now_time - orig_time - current_app.logger.info( + current_app.logger.warning( f"#notify-debug-admin-1859 dao_create_job orig created at {orig_time} and now {now_time}" ) if diff_time.total_seconds() > 300: # It should be only a few seconds diff at most - current_app.logger.error( + current_app.logger.warning( "#notify-debug-admin-1859 Something is wrong with job.created_at!" ) if os.getenv("NOTIFY_ENVIRONMENT") not in ["test"]: job.created_at = now_time dao_update_job(job) - current_app.logger.error( + current_app.logger.warning( f"#notify-debug-admin-1859 Job created_at reset to {job.created_at}" ) diff --git a/app/dao/notifications_dao.py b/app/dao/notifications_dao.py index 9a4f219a8..76c0baea0 100644 --- a/app/dao/notifications_dao.py +++ b/app/dao/notifications_dao.py @@ -112,17 +112,17 @@ def dao_create_notification(notification): except ValueError: orig_time = datetime.strptime(orig_time, "%Y-%m-%d") diff_time = now_time - orig_time - current_app.logger.error( + current_app.logger.warning( f"dao_create_notification orig created at: {orig_time} and now created at: {now_time}" ) if diff_time.total_seconds() > 300: - current_app.logger.error( + current_app.logger.warning( "Something is wrong with notification.created_at in email!" ) if os.getenv("NOTIFY_ENVIRONMENT") not in ["test"]: notification.created_at = now_time dao_update_notification(notification) - current_app.logger.error( + current_app.logger.warning( f"Email notification created_at reset to {notification.created_at}" )