mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-24 16:41:25 +01:00
fix bug found in the pluggable scanner
- fix #9632 - fix #9633 Signed-off-by: Steven Zou <szou@vmware.com>
This commit is contained in:
parent
eb8d47975c
commit
35d074e849
@ -95,7 +95,7 @@ func (sa *All) Run(ctx job.Context, params job.Parameters) error {
|
||||
data, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
logger.Errorf("Failed to read response, error: %v", err)
|
||||
} else if resp.StatusCode != http.StatusOK {
|
||||
} else if resp.StatusCode != http.StatusAccepted {
|
||||
logger.Errorf("Unexpected response code: %d, data: %v", resp.StatusCode, data)
|
||||
}
|
||||
resp.Body.Close()
|
||||
|
@ -26,5 +26,7 @@ func Init() {
|
||||
log.Debugf("Subscribe topic %s for cascade deletion of scan reports", model.DeleteImageTopic)
|
||||
|
||||
err := notifier.Subscribe(model.DeleteImageTopic, NewOnDelImageHandler())
|
||||
log.Error(errors.Wrap(err, "register on delete image handler: init: scan"))
|
||||
if err != nil {
|
||||
log.Error(errors.Wrap(err, "register on delete image handler: init: scan"))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user