mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-23 02:35:17 +01:00
Merge pull request #9634 from steven-zou/fix/#9632_and_#9633
fix bug found in the pluggable scanner
This commit is contained in:
commit
adf780c2a5
@ -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