You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "eladkal (via GitHub)" <gi...@apache.org> on 2024/06/05 18:07:36 UTC

Re: [PR] catch sentry flush if exception happens in _execute_in_fork finally block [airflow]

eladkal commented on code in PR #40060:
URL: https://github.com/apache/airflow/pull/40060#discussion_r1628205388


##########
airflow/providers/celery/executors/celery_executor_utils.py:
##########
@@ -175,7 +175,11 @@ def _execute_in_fork(command_to_exec: CommandType, celery_task_id: str | None =
         log.exception("[%s] Failed to execute task.", celery_task_id)
         ret = 1
     finally:
-        Sentry.flush()
+        try:
+            Sentry.flush()
+        except Exception:
+            log.exception("Failed to flush Sentry")

Review Comment:
   Is there a reason not to log the traceback?



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org