(apiName string, jobStatus status.TaskJobStatus)
| 164 | } |
| 165 | |
| 166 | func TaskJobLogURL(apiName string, jobStatus status.TaskJobStatus) (string, error) { |
| 167 | partition := "aws.amazon" |
| 168 | region := config.ClusterConfig.Region |
| 169 | if awslib.PartitionFromRegion(region) == "aws-us-gov" { |
| 170 | partition = "amazonaws-us-gov" |
| 171 | } |
| 172 | logGroup := config.ClusterConfig.ClusterName |
| 173 | if jobStatus.EndTime != nil { |
| 174 | endTime := *jobStatus.EndTime |
| 175 | endTime = endTime.Add(60 * time.Second) |
| 176 | return completedBatchJobLogsURL(completedJobLogURLTemplateArgs{ |
| 177 | Partition: partition, |
| 178 | Region: region, |
| 179 | StartTime: timeString(jobStatus.StartTime), |
| 180 | EndTime: timeString(endTime), |
| 181 | LogGroup: logGroup, |
| 182 | APIName: apiName, |
| 183 | JobID: jobStatus.ID, |
| 184 | }) |
| 185 | } |
| 186 | return inProgressBatchJobLogsURL(inProgressJobLogURLTemplateArgs{ |
| 187 | Partition: partition, |
| 188 | Region: region, |
| 189 | LogGroup: logGroup, |
| 190 | APIName: apiName, |
| 191 | JobID: jobStatus.ID, |
| 192 | }) |
| 193 | } |
| 194 | |
| 195 | func waitForPodToBeNotPending(podName string, cancelListener chan struct{}, socket *websocket.Conn) bool { |
| 196 | wrotePending := false |
no test coverage detected