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


##########
providers/edge3/src/airflow/providers/edge3/plugins/www/src/pages/JobsPage.tsx:
##########
@@ -22,12 +22,17 @@ import { useUiServiceJobs } from "openapi/queries";
 import { ErrorAlert } from "src/components/ErrorAlert";
 
 export const JobsPage = () => {
-  const { data, error } = useUiServiceJobs();
+  // Note: might use this in future but core-ui-API is not yet bound:
+  // const autoRefreshInterval = useConfig("auto_refresh_interval") as number 
| undefined;
+  const autoRefreshInterval = 5000;

Review Comment:
   Maybe extract that into a constant somewhere. So we only have 1 comment and 
1 `autoFrefreshInterval` value.
   
   And import it in both files.



##########
providers/edge3/src/airflow/providers/edge3/plugins/www/src/pages/JobsPage.tsx:
##########
@@ -22,12 +22,17 @@ import { useUiServiceJobs } from "openapi/queries";
 import { ErrorAlert } from "src/components/ErrorAlert";
 
 export const JobsPage = () => {
-  const { data, error } = useUiServiceJobs();
+  // Note: might use this in future but core-ui-API is not yet bound:
+  // const autoRefreshInterval = useConfig("auto_refresh_interval") as number 
| undefined;

Review Comment:
   You could still call the config endpoint and retrieve the interval from 
there. (even if you don't have the nice auto-generated custom hook `useConfig` 
to do that). (but not blocking, can merge like this and improve later if needed)



-- 
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]

Reply via email to