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

Function SetRunningStatus

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

Source from the content-addressed store, hash-verified

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()))
339 if err != nil {
340 return err
341 }
342
343 err = uploadInProgressFile(jobKey) // in progress file should already be there but just in case
344 if err != nil {
345 return err
346 }
347
348 return nil
349}
350
351func SetStoppedStatus(jobKey spec.JobKey) error {
352 err := config.AWS.UploadStringToS3("", config.ClusterConfig.Bucket, path.Join(jobKey.Prefix(config.ClusterConfig.ClusterUID), status.JobStopped.String()))

Callers 2

deployJobFunction · 0.92
SetStatusForJobFunction · 0.85

Calls 4

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

Tested by

no test coverage detected