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)
|
myLogger.Infof("Check preheat progress: %s", s)
|
||||||
|
|
||||||
// Finished
|
switch s.Status {
|
||||||
if s.Status == provider.PreheatingStatusSuccess {
|
case provider.PreheatingStatusFail:
|
||||||
|
// Fail
|
||||||
|
return preheatJobRunningError(errors.Errorf("preheat failed: %s", s))
|
||||||
|
case provider.PreheatingStatusSuccess:
|
||||||
|
// Finished
|
||||||
return nil
|
return nil
|
||||||
|
default:
|
||||||
|
// do nothing, check again
|
||||||
}
|
}
|
||||||
|
|
||||||
if shouldStop() {
|
if shouldStop() {
|
||||||
|
Loading…
Reference in New Issue
Block a user