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

Function taskWatchIsEnded

cli/task_status.go:141–155  ·  view source on GitHub ↗
(task codersdk.Task)

Source from the content-addressed store, hash-verified

139}
140
141func taskWatchIsEnded(task codersdk.Task) bool {
142 if task.WorkspaceStatus == codersdk.WorkspaceStatusStopped {
143 return true
144 }
145 if task.WorkspaceAgentHealth == nil || !task.WorkspaceAgentHealth.Healthy {
146 return false
147 }
148 if task.WorkspaceAgentLifecycle == nil || task.WorkspaceAgentLifecycle.Starting() || task.WorkspaceAgentLifecycle.ShuttingDown() {
149 return false
150 }
151 if task.CurrentState == nil || task.CurrentState.State == codersdk.TaskStateWorking {
152 return false
153 }
154 return true
155}
156
157type taskStatusRow struct {
158 codersdk.Task `table:"r,recursive_inline"`

Callers 1

taskStatusMethod · 0.85

Calls 2

ShuttingDownMethod · 0.80
StartingMethod · 0.45

Tested by

no test coverage detected