Cleanup
This commit is contained in:
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()
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user