MCPcopy
hub / github.com/cortexlabs/cortex / SetFailedStatus

Function SetFailedStatus

pkg/operator/resources/job/state.go:323–335  ·  view source on GitHub ↗
(jobKey spec.JobKey)

Source from the content-addressed store, hash-verified

321}
322
323func SetFailedStatus(jobKey spec.JobKey) error {
324 err := config.AWS.UploadStringToS3("", config.ClusterConfig.Bucket, path.Join(jobKey.Prefix(config.ClusterConfig.ClusterUID), status.JobEnqueueFailed.String()))
325 if err != nil {
326 return err
327 }
328
329 err = DeleteInProgressFile(jobKey)
330 if err != nil {
331 return err
332 }
333
334 return nil
335}
336
337func SetRunningStatus(jobKey spec.JobKey) error {
338 err := config.AWS.UploadStringToS3("", config.ClusterConfig.Bucket, path.Join(jobKey.Prefix(config.ClusterConfig.ClusterUID), status.JobRunning.String()))

Callers

nothing calls this directly

Calls 4

DeleteInProgressFileFunction · 0.85
UploadStringToS3Method · 0.80
PrefixMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected