potiuk commented on code in PR #30255:
URL: https://github.com/apache/airflow/pull/30255#discussion_r1161339066
##########
airflow/www/views.py:
##########
@@ -635,12 +635,14 @@ class AirflowBaseView(BaseView):
def render_template(self, *args, **kwargs):
# Add triggerer_job only if we need it
- if TriggererJob.is_needed():
- kwargs["triggerer_job"] =
lazy_object_proxy.Proxy(TriggererJob.most_recent_job)
+ if TriggererJobRunner.is_needed():
+ kwargs["triggerer_job"] = lazy_object_proxy.Proxy(
+ lambda: most_recent_job(TriggererJobRunner.job_type)
+ )
Review Comment:
Added it back.
##########
airflow/www/views.py:
##########
@@ -635,12 +635,14 @@ class AirflowBaseView(BaseView):
def render_template(self, *args, **kwargs):
# Add triggerer_job only if we need it
- if TriggererJob.is_needed():
- kwargs["triggerer_job"] =
lazy_object_proxy.Proxy(TriggererJob.most_recent_job)
+ if TriggererJobRunner.is_needed():
+ kwargs["triggerer_job"] = lazy_object_proxy.Proxy(
+ lambda: most_recent_job(TriggererJobRunner.job_type)
+ )
return super().render_template(
*args,
# Cache this at most once per request, not for the lifetime of the
view instance
-
scheduler_job=lazy_object_proxy.Proxy(SchedulerJob.most_recent_job),
+ scheduler_job=lazy_object_proxy.Proxy(lambda:
most_recent_job(SchedulerJobRunner.job_type)),
Review Comment:
same
--
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]