From ff54ae3f662f571bc30db8577d9d6351abf54ca4 Mon Sep 17 00:00:00 2001 From: Bruno Quaresma Date: Wed, 30 Apr 2025 11:17:41 -0300 Subject: [PATCH] fix: update devcontainer data every 10s (#17619) Fix https://github.com/coder/internal/issues/594 **Notice:** This is a temporary solution to get the devcontainers feature released. Maybe a better solution, to avoid pulling the API every 10 seconds, is to implement a websocket connection to get updates on containers. --- site/src/modules/resources/AgentRow.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/site/src/modules/resources/AgentRow.tsx b/site/src/modules/resources/AgentRow.tsx index 4d14d2f0a9..c4d104501f 100644 --- a/site/src/modules/resources/AgentRow.tsx +++ b/site/src/modules/resources/AgentRow.tsx @@ -158,6 +158,9 @@ export const AgentRow: FC = ({ ]), enabled: agent.status === "connected", select: (res) => res.containers.filter((c) => c.status === "running"), + // TODO: Implement a websocket connection to get updates on containers + // without having to poll. + refetchInterval: 10_000, }); return (