dstandish commented on code in PR #41232:
URL: https://github.com/apache/airflow/pull/41232#discussion_r1717193757
##########
airflow/jobs/triggerer_job_runner.py:
##########
@@ -643,7 +648,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["termination_reason"]):
Review Comment:
Rather than adding a new method "should_cleanup" i think it would be better
if we just add `reason` as an argument to `cleanup` signature. Then cleanup
can choose to do nothing in that case. Simpler and more direct that way.
--
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]