MCPcopy Index your code
hub / github.com/cortexlabs/cortex / TaskJobLogURL

Function TaskJobLogURL

pkg/operator/operator/workload_logging.go:166–193  ·  view source on GitHub ↗
(apiName string, jobStatus status.TaskJobStatus)

Source from the content-addressed store, hash-verified

164}
165
166func 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
195func waitForPodToBeNotPending(podName string, cancelListener chan struct{}, socket *websocket.Conn) bool {
196 wrotePending := false

Callers 1

GetJobLogURLFunction · 0.92

Calls 4

completedBatchJobLogsURLFunction · 0.85
timeStringFunction · 0.85
AddMethod · 0.45

Tested by

no test coverage detected