aminghadersohi commented on code in PR #35595:
URL: https://github.com/apache/superset/pull/35595#discussion_r2420330914


##########
superset/tasks/scheduler.py:
##########
@@ -40,8 +41,18 @@
 
 logger = logging.getLogger(__name__)
 
+@task_failure.connect
+def log_task_failure(sender=None, task_id=None, exception=None, args=None, 
kwargs=None, traceback=None, einfo=None, **kw):
+    logger.exception(f"Celery task {sender.name} failed: {exception}", 
exc_info=einfo)
 
-@celery_app.task(name="reports.scheduler")
+
+@celery_app.task(
+    name="reports.scheduler",
+    bind=True,
+    autoretry_for=(Exception,),

Review Comment:
   Should we exclude SoftTimeLimitExceeded from auto-retry?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to