(task codersdk.Task)
| 139 | } |
| 140 | |
| 141 | func 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 | |
| 157 | type taskStatusRow struct { |
| 158 | codersdk.Task `table:"r,recursive_inline"` |
no test coverage detected