MCPcopy Index your code
hub / github.com/coder/coder / waitUntilUrlIsNotResponding

Function waitUntilUrlIsNotResponding

site/e2e/helpers.ts:554–573  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

552};
553
554export const waitUntilUrlIsNotResponding = async (url: string) => {
555 const maxRetries = 30;
556 const retryIntervalMs = 1000;
557 let retries = 0;
558
559 const axiosInstance = API.getAxiosInstance();
560 while (retries < maxRetries) {
561 try {
562 await axiosInstance.get(url);
563 } catch {
564 return;
565 }
566
567 retries++;
568 await new Promise((resolve) => setTimeout(resolve, retryIntervalMs));
569 }
570 throw new Error(
571 `URL ${url} is still responding after ${maxRetries * retryIntervalMs}ms`,
572 );
573};
574
575// Allows users to more easily define properties they want for agents and resources!
576type RecursivePartial<T> = {

Callers 2

stopWorkspaceProxyFunction · 0.90
stopAgentFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected