all repos — searchix @ afc540fd97b14f96cac85e6d45de669f6d35a00d

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

feat: also prune storage and index on SIGUSR1

Alan Pearce
commit

afc540fd97b14f96cac85e6d45de669f6d35a00d

parent

dd9ca0bf112a847749f4b92276baa4b89b153b8a

1 file changed, 9 insertions(+), 0 deletions(-)

changed files
M cmd/searchix-web/serve.gocmd/searchix-web/serve.go
@@ -138,6 +138,15 @@ if err != nil {
logger.Error("manual index error", "error", err) } logger.Info("manual re-index completed") + + if sig == syscall.SIGUSR1 { + logger.Info("manual prune") + err = imp.Prune(ctx) + if err != nil { + logger.Error("manual prune error", "error", err) + } + logger.Info("manual prune completed") + } } }() signal.Notify(reimport, syscall.SIGUSR1, syscall.SIGUSR2)