kakatur commented on code in PR #64745:
URL: https://github.com/apache/airflow/pull/64745#discussion_r3068396130
##########
providers/amazon/src/airflow/providers/amazon/aws/operators/batch.py:
##########
@@ -257,9 +263,13 @@ def execute_complete(self, context: Context, event:
dict[str, Any] | None = None
self.job_id = validated_event["job_id"]
- # Fetch logs if awslogs_enabled
+ # Fetch logs if awslogs_enabled (links were already persisted before
deferring)
if self.awslogs_enabled:
- self.monitor_job(context) # fetch logs, no need to return
+ # monitor_job() handles log fetching and success check
+ self.monitor_job(context)
+ else:
+ # Links already persisted before deferring, just check job success
+ self.hook.check_job_success(self.job_id)
Review Comment:
Eliminated redundant monitor_job() call in execute_complete() to avoid
re-running wait_for_job()
--
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]