eschutho commented on code in PR #35595:
URL: https://github.com/apache/superset/pull/35595#discussion_r2422159858
##########
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:
Good question. I can see a case for either- if it timed out, it's likely to
time out again, so why waste resources, but on the other hand, what if the time
out was unusual, and it will succeed the next time. What do you think?
--
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]