all repos — searchix @ dd9ca0bf112a847749f4b92276baa4b89b153b8a

Search engine for NixOS, nix-darwin, home-manager and NUR users

feat: improve logging of pruning process

Alan Pearce
commit

dd9ca0bf112a847749f4b92276baa4b89b153b8a

parent

6ae7560fb293ff0bc1dbd2cc490040ac2990266e

1 file changed, 10 insertions(+), 10 deletions(-)

changed files
M internal/importer/main.gointernal/importer/main.go
@@ -189,16 +189,6 @@ if err != nil {
return fault.Wrap(err, fmsg.With("failed to retrieve entities for pruning")) } - imp.options.Logger.Debug( - "pruning", - "type", - source.Importer.String(), - "source", - source.Key, - "count", - count, - ) - if count == 0 { return nil }
@@ -243,6 +233,16 @@ err = tx.Commit()
if err != nil { return fault.Wrap(err, fmsg.With("Failed to commit transaction")) } + + imp.options.Logger.Info( + "pruned old entities", + "type", + source.Importer.String(), + "source", + source.Key, + "count", + count, + ) return nil }