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

Function SetEnqueuingStatus

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

Source from the content-addressed store, hash-verified

302}
303
304func SetEnqueuingStatus(jobKey spec.JobKey) error {
305 err := UpdateLiveness(jobKey)
306 if err != nil {
307 return err
308 }
309
310 err = config.AWS.UploadStringToS3("", config.ClusterConfig.Bucket, path.Join(jobKey.Prefix(config.ClusterConfig.ClusterUID), status.JobEnqueuing.String()))
311 if err != nil {
312 return err
313 }
314
315 err = uploadInProgressFile(jobKey)
316 if err != nil {
317 return err
318 }
319
320 return nil
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()))

Callers 1

SetStatusForJobFunction · 0.85

Calls 5

UpdateLivenessFunction · 0.85
uploadInProgressFileFunction · 0.85
UploadStringToS3Method · 0.80
PrefixMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected