uranusjr commented on code in PR #41232:
URL: https://github.com/apache/airflow/pull/41232#discussion_r1716331102
##########
airflow/jobs/triggerer_job_runner.py:
##########
@@ -643,7 +647,9 @@ async def run_trigger(self, trigger_id, trigger):
# allow triggers a chance to cleanup, either in that case or if
# they exit cleanly. Exception from cleanup methods are ignored.
with suppress(Exception):
- await trigger.cleanup()
+ trigger_details = self.triggers[trigger_id]
+ if
trigger.should_cleanup(trigger_details.get("termination_reason")):
Review Comment:
… and this should not use `get()` but just regular `[]`.
##########
airflow/jobs/triggerer_job_runner.py:
##########
@@ -441,6 +441,7 @@ class TriggerDetails(TypedDict):
task: asyncio.Task
name: str
events: int
+ termination_reason: TriggerTerminationReason | None
Review Comment:
This key should be initialized in `create_triggers`
--
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]