MCPcopy Create free account
hub / github.com/coder/coder / isShuttingDown

Function isShuttingDown

site/src/utils/schedule.tsx:71–80  ·  view source on GitHub ↗
(workspace: Workspace, deadline?: Dayjs)

Source from the content-addressed store, hash-verified

69};
70
71const isShuttingDown = (workspace: Workspace, deadline?: Dayjs): boolean => {
72 if (!deadline) {
73 if (!workspace.latest_build.deadline) {
74 return false;
75 }
76 deadline = dayjs(workspace.latest_build.deadline).utc();
77 }
78 const now = dayjs().utc();
79 return isWorkspaceOn(workspace) && now.isAfter(deadline);
80};
81
82export const autostopDisplay = (
83 workspace: Workspace,

Callers 1

autostopDisplayFunction · 0.85

Calls 1

isWorkspaceOnFunction · 0.90

Tested by

no test coverage detected