You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "jayceslesar (via GitHub)" <gi...@apache.org> on 2025/03/28 17:07:40 UTC
Re: [I] Deferrable operator tasks do not call `on_kill` method when fail or restarted [airflow]
jayceslesar commented on issue #36090:
URL: https://github.com/apache/airflow/issues/36090#issuecomment-2761947537
@thesuperzapper is it not possible for operators to catch the `asyncio.CancelledError` in `execute_complete` ? Something like
```py
def execute_complete(...):
try:
...
except asyncio.CancelledError:
if context["ti"].state != TaskInstanceState.DEFERRED:
self.on_kill()
```
--
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