(jobKey spec.JobKey, jobStatus status.JobCode)
| 267 | } |
| 268 | |
| 269 | func SetStatusForJob(jobKey spec.JobKey, jobStatus status.JobCode) error { |
| 270 | switch jobStatus { |
| 271 | case status.JobEnqueuing: |
| 272 | return SetEnqueuingStatus(jobKey) |
| 273 | case status.JobRunning: |
| 274 | return SetRunningStatus(jobKey) |
| 275 | case status.JobEnqueueFailed: |
| 276 | return SetEnqueueFailedStatus(jobKey) |
| 277 | case status.JobCompletedWithFailures: |
| 278 | return SetCompletedWithFailuresStatus(jobKey) |
| 279 | case status.JobSucceeded: |
| 280 | return SetSucceededStatus(jobKey) |
| 281 | case status.JobUnexpectedError: |
| 282 | return SetUnexpectedErrorStatus(jobKey) |
| 283 | case status.JobWorkerError: |
| 284 | return SetWorkerErrorStatus(jobKey) |
| 285 | case status.JobWorkerOOM: |
| 286 | return SetWorkerOOMStatus(jobKey) |
| 287 | case status.JobTimedOut: |
| 288 | return SetTimedOutStatus(jobKey) |
| 289 | case status.JobStopped: |
| 290 | return SetStoppedStatus(jobKey) |
| 291 | } |
| 292 | return nil |
| 293 | } |
| 294 | |
| 295 | func UpdateLiveness(jobKey spec.JobKey) error { |
| 296 | s3Key := path.Join(jobKey.Prefix(config.ClusterConfig.ClusterUID), _enqueuingLivenessFile) |
no test coverage detected