From e26064436bfaaa84555d48d2ca9f60007a612cd5 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Sun, 12 Apr 2020 15:05:28 +0530 Subject: [PATCH] chore: Do not print traceback in console - Instead print class of error and the site name --- frappe/utils/scheduler.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frappe/utils/scheduler.py b/frappe/utils/scheduler.py index 0a1eb555ad..596595a160 100755 --- a/frappe/utils/scheduler.py +++ b/frappe/utils/scheduler.py @@ -43,9 +43,8 @@ def enqueue_events_for_all_sites(): for site in sites: try: enqueue_events_for_site(site=site) - except: - # it should try to enqueue other sites - print(frappe.get_traceback()) + except Exception as e: + print(e.__class__, 'Failed to enqueue events for site: {}'.format(site)) def enqueue_events_for_site(site): def log_and_raise():