This commit is contained in:
André Duffeck committed 2022-05-02 18:43:03 +02:00
1 parent a1b34a62a7
commit fd4ec56b3e
1 file changed
+5 -7
@@ -124,16 +124,14 @@ func New(gwClient gateway.GatewayAPIClient, indexClient search.IndexClient, mach
switch statRes.Status.Code { switch statRes.Status.Code {
case rpc.Code_CODE_OK: case rpc.Code_CODE_OK:
err = p.indexClient.Add(ref, statRes.Info) err = p.indexClient.Add(ref, statRes.Info)
if err != nil {
p.logger.Error().Err(err).Msg("error adding updating the resource in the index")
} else {
p.logDocCount()
}
default: default:
p.logger.Error().Interface("statRes", statRes).Msg("failed to stat the changed resource") p.logger.Error().Interface("statRes", statRes).Msg("failed to stat the changed resource")
} }
if err != nil {
p.logger.Error().Err(err).Msg("error adding updating the resource in the index")
} else {
p.logDocCount()
}
} }
}() }()