vandonr-amz commented on code in PR #32534:
URL: https://github.com/apache/airflow/pull/32534#discussion_r1267352246
##########
airflow/providers/amazon/aws/operators/emr.py:
##########
@@ -1227,6 +1256,45 @@ def execute(self, context: Context) -> str | None:
return self.job_id
+ def start_job_run_after_defer(self, context: Context, event: dict[str,
Any] | None = None) -> None:
Review Comment:
I've seen in the docs that you can do a re-entering execute if you add
`event` as a parameter, I'm wondering if it would make sense here.
I'd save some code duplication, with very little `if else` needed I think
(since you can rely on the `if app_state not in
EmrServerlessHook.APPLICATION_SUCCESS_STATES:` that's already there for the
code to take the correct path.
Just a little check on `event["status"] == "success"` at the top would
suffice.
--
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]