You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Copilot (via GitHub)" <gi...@apache.org> on 2025/09/03 13:21:23 UTC

Re: [PR] Feature/add auto refresh to edge react UI [airflow]

Copilot commented on code in PR #54994:
URL: https://github.com/apache/airflow/pull/54994#discussion_r2318964607


##########
providers/edge3/src/airflow/providers/edge3/plugins/www/src/pages/WorkerPage.tsx:
##########
@@ -22,12 +22,11 @@ import { useUiServiceWorker } from "openapi/queries";
 import { ErrorAlert } from "src/components/ErrorAlert";
 
 export const WorkerPage = () => {
-  const { data, error } = useUiServiceWorker();
+  const { data, error } = useUiServiceWorker(undefined, { enabled: true, refetchInterval: 5000 });

Review Comment:
   The 5000ms refetch interval is a magic number that should be extracted to a named constant to improve maintainability and allow for easy configuration changes.



##########
providers/edge3/src/airflow/providers/edge3/plugins/www/src/pages/JobsPage.tsx:
##########
@@ -22,12 +22,11 @@ import { useUiServiceJobs } from "openapi/queries";
 import { ErrorAlert } from "src/components/ErrorAlert";
 
 export const JobsPage = () => {
-  const { data, error } = useUiServiceJobs();
+  const { data, error } = useUiServiceJobs(undefined, { enabled: true, refetchInterval: 5000 });

Review Comment:
   The 5000ms refetch interval is a magic number that should be extracted to a named constant to improve maintainability and allow for easy configuration changes.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org