fix: security scanner warning noise: error handlers part 2 (#2145)

check off a few more error handlers

Signed-off-by: Dave Lee <dave@gray101.com>
This commit is contained in:
Dave 2024-04-29 09:11:42 -04:00 committed by GitHub
parent b7ea9602f5
commit 11c48a0004
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 82 additions and 24 deletions

View file

@ -174,7 +174,10 @@ func (ml *ModelLoader) CheckIsLoaded(s string) ModelAddress {
if !ml.grpcProcesses[s].IsAlive() {
log.Debug().Msgf("GRPC Process is not responding: %s", s)
// stop and delete the process, this forces to re-load the model and re-create again the service
ml.deleteProcess(s)
err := ml.deleteProcess(s)
if err != nil {
log.Error().Err(err).Str("process", s).Msg("error stopping process")
}
return ""
}
}