feat(ops/modules): reindex livegrap when depot refs change

Change-Id: I917e628428171fa30a89e061cd9bf07e5a759081
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10950
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: tazjin <tazjin@tvl.su>
This commit is contained in:
Vincent Ambo 2024-02-17 14:56:47 +07:00 committed by clbot
parent 33e68496f2
commit 6be42d6a35

View file

@ -81,6 +81,23 @@ in
# TODO(tazjin): docroot with styles etc.
];
};
systemd.services.livegrep-reindex = {
script = "${pkgs.docker}/bin/docker exec livegrep-codesearch /livegrep/bin/livegrep-reload localhost:5427";
serviceConfig.Type = "oneshot";
};
systemd.paths.livegrep-reindex = {
description = "Executes a livegrep reindex if depot refs change";
wantedBy = [ "multi-user.target" ];
pathConfig = {
PathChanged = [
"/var/lib/gerrit/git/depot.git/packed-refs"
"/var/lib/gerrit/git/depot.git/refs"
];
};
};
};
}