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:
parent
33e68496f2
commit
6be42d6a35
1 changed files with 17 additions and 0 deletions
|
@ -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"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue