kaxil commented on code in PR #48244:
URL: https://github.com/apache/airflow/pull/48244#discussion_r2017575183
##########
task-sdk/src/airflow/sdk/definitions/baseoperator.py:
##########
@@ -1555,6 +1555,46 @@ def render_template_fields(
jinja_env = self.get_template_env()
self._do_render_template_fields(self, self.template_fields, context,
jinja_env, set())
+ def pre_execute(self, context: Any):
+ """Execute right before self.execute() is called."""
+ if self._pre_execute_hook is None:
+ return
+ from airflow.sdk.execution_time.callback_runner import
create_executable_runner
+ from airflow.sdk.execution_time.context import
context_get_outlet_events
+
+ create_executable_runner(
+ self._pre_execute_hook,
+ context_get_outlet_events(context),
+ logger=self.log,
+ ).run(context)
Review Comment:
Done
--
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]