mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-18 14:47:38 +01:00
Merge pull request #12906 from steven-zou/fix/preheat-job
fix(preheat):handle fail case of preheat in job
This commit is contained in:
commit
bc3433194b
@ -185,9 +185,15 @@ func (j *Job) Run(ctx job.Context, params job.Parameters) error {
|
||||
|
||||
myLogger.Infof("Check preheat progress: %s", s)
|
||||
|
||||
// Finished
|
||||
if s.Status == provider.PreheatingStatusSuccess {
|
||||
switch s.Status {
|
||||
case provider.PreheatingStatusFail:
|
||||
// Fail
|
||||
return preheatJobRunningError(errors.Errorf("preheat failed: %s", s))
|
||||
case provider.PreheatingStatusSuccess:
|
||||
// Finished
|
||||
return nil
|
||||
default:
|
||||
// do nothing, check again
|
||||
}
|
||||
|
||||
if shouldStop() {
|
||||
|
Loading…
Reference in New Issue
Block a user