apilaskowski commented on code in PR #29815:
URL: https://github.com/apache/airflow/pull/29815#discussion_r1146094311


##########
airflow/jobs/base_job.py:
##########
@@ -175,6 +176,17 @@ def kill(self, session=None):
     def on_kill(self):
         """Will be called when an external kill command is received."""
 
+    @retry_db_transaction
+    def handle_db_transaction_with_session(self, task_function, session):
+        return task_function(session)
+  
+    def handle_db_task(self, task_function):
+        try:
+            with create_session() as session:
+                return self.handle_db_transaction_with_session(task_function, 
session)
+        except OperationalError:
+            raise

Review Comment:
   You are right. I thought that I saw similar construct in code, however, I 
can not find it.
   Nevertheless, I will remove this part.



-- 
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]

Reply via email to