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 2022/06/20 18:27:23 UTC

[GitHub] [airflow] kaxil commented on a diff in pull request #24559: Add on_kill() to kill Trino query if Airflow task is killed

kaxil commented on code in PR #24559:
URL: https://github.com/apache/airflow/pull/24559#discussion_r901924764


##########
airflow/providers/trino/operators/trino.py:
##########
@@ -79,3 +81,18 @@ def execute(self, context: 'Context') -> None:
         self.hook.run(
             sql=self.sql, autocommit=self.autocommit, parameters=self.parameters, handler=self.handler
         )
+
+    def on_kill(self) -> None:
+        if self.hook is not None and isinstance(self.hook, TrinoHook):

Review Comment:
   The following might be sufficient
   
   ```suggestion
           if isinstance(self.hook, TrinoHook):
   ```



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