You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/08/22 17:16:31 UTC

[GitHub] [airflow] villasv commented on a change in pull request #5883: [AIRFLOW-5194] Add error handler to action log

villasv commented on a change in pull request #5883: [AIRFLOW-5194] Add error handler to action log
URL: https://github.com/apache/airflow/pull/5883#discussion_r316793212
 
 

 ##########
 File path: airflow/utils/cli_action_loggers.py
 ##########
 @@ -94,8 +94,11 @@ def default_action_log(log, **_):
     :param **_: other keyword arguments that is not being used by this function
     :return: None
     """
-    with create_session() as session:
-        session.add(log)
+    try:
+        with create_session() as session:
+            session.add(log)
+    except Exception as error:
 
 Review comment:
   It is, though I don't think it's worth it. An SQLAchemy exception is basically the only thing that could pop out of that `session.add`, and filtering by error message doesn't seem relevant to me.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services