mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-18 14:47:38 +01:00
fix(preheat):handle fail case of preheat in job
Signed-off-by: Steven Zou <szou@vmware.com>
This commit is contained in:
parent
560eba7bd1
commit
d4108e3fac
@ -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