kaxil commented on code in PR #75358:
URL: https://github.com/apache/airflow/pull/75358#discussion_r4352911936
##########
providers/standard/src/airflow/providers/standard/operators/python.py:
##########
@@ -236,6 +245,43 @@ def __prepare_execution() ->
tuple[ExecutionCallableRunner, OutletEventAccessors
return return_value
+ def resume_with_input(
+ self,
+ context: Context,
+ event: dict[str, Any],
+ key: str,
+ options: list[str],
+ params: dict[str, dict[str, Any]],
+ answered: list[list[Any]],
+ ) -> Any:
+ """
+ Run the task again once the input it asked for with
``request_input()`` arrives.
+
+ The callable runs from the top. Each ``request_input()`` call that was
answered, in this or
+ an earlier pause, returns its answer instead of asking again, and the
run fails if it never
+ reads the answer it resumed with. A request that timed out without
defaults raises
+ :class:`~airflow.providers.standard.exceptions.HITLTimeoutError`.
+ """
+ if "error" in event:
+ raise_for_error_event(event)
+ validate_chosen_options(event["chosen_options"], options)
+ validate_params_input(event["params_input"],
params_from_serialized(params))
Review Comment:
Left this one: this path is 3.4+ only and core always sends a dict there,
while `execute_complete` also handles the older trigger events. Happy to mirror
it if you prefer.
--
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]