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

Function DownloadTaskJobSpec

pkg/operator/operator/storage.go:69–75  ·  view source on GitHub ↗
(jobKey spec.JobKey)

Source from the content-addressed store, hash-verified

67}
68
69func DownloadTaskJobSpec(jobKey spec.JobKey) (*spec.TaskJob, error) {
70 jobSpec := spec.TaskJob{}
71 if err := config.AWS.ReadJSONFromS3(&jobSpec, config.ClusterConfig.Bucket, jobKey.SpecFilePath(config.ClusterConfig.ClusterUID)); err != nil {
72 return nil, errors.Wrap(err, "unable to download job specification", jobKey.UserString())
73 }
74 return &jobSpec, nil
75}

Callers 2

getJobStatusFromJobStateFunction · 0.92
ManageJobResourcesFunction · 0.92

Calls 4

WrapFunction · 0.92
ReadJSONFromS3Method · 0.80
SpecFilePathMethod · 0.80
UserStringMethod · 0.45

Tested by

no test coverage detected