mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-09 09:27:42 +01:00
enhance(replication) update healthy status immediately
Signed-off-by: Ziming Zhang <zziming@vmware.com>
This commit is contained in:
parent
b546d9167a
commit
25b5c3796b
@ -223,6 +223,7 @@ func (t *RegistryAPI) Post() {
|
||||
return
|
||||
}
|
||||
|
||||
r.Status = model.Healthy
|
||||
id, err := t.manager.Add(r)
|
||||
if err != nil {
|
||||
log.Errorf("Add registry '%s' error: %v", r.URL, err)
|
||||
@ -309,6 +310,7 @@ func (t *RegistryAPI) Put() {
|
||||
return
|
||||
}
|
||||
|
||||
r.Status = model.Healthy
|
||||
if err := t.manager.Update(r); err != nil {
|
||||
log.Errorf("Update registry %d error: %v", id, err)
|
||||
t.SendInternalServerError(err)
|
||||
|
Loading…
Reference in New Issue
Block a user