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

Function SetUnexpectedErrorStatus

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

Source from the content-addressed store, hash-verified

433}
434
435func SetUnexpectedErrorStatus(jobKey spec.JobKey) error {
436 err := config.AWS.UploadStringToS3("", config.ClusterConfig.Bucket, path.Join(jobKey.Prefix(config.ClusterConfig.ClusterUID), status.JobUnexpectedError.String()))
437 if err != nil {
438 return err
439 }
440
441 err = DeleteInProgressFile(jobKey)
442 if err != nil {
443 return err
444 }
445
446 return nil
447}
448
449func SetTimedOutStatus(jobKey spec.JobKey) error {
450 err := config.AWS.UploadStringToS3("", config.ClusterConfig.Bucket, path.Join(jobKey.Prefix(config.ClusterConfig.ClusterUID), status.JobTimedOut.String()))

Callers 2

handleJobSubmissionErrorFunction · 0.92
SetStatusForJobFunction · 0.85

Calls 4

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

Tested by

no test coverage detected