From 401f5bdce2721af4e53d755f59f5d437bfb427e1 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 26 Jun 2015 15:24:12 +0200 Subject: [PATCH] Add a unit for hydra-send-stats --- hydra-module.nix | 20 +++++++++++++++----- src/script/Makefile.am | 1 + 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/hydra-module.nix b/hydra-module.nix index 0933e9a6..823ca0c0 100644 --- a/hydra-module.nix +++ b/hydra-module.nix @@ -186,7 +186,7 @@ in build-compress-log = false ''; - systemd.services."hydra-init" = + systemd.services.hydra-init = { wantedBy = [ "multi-user.target" ]; requires = [ "postgresql.service" ]; after = [ "postgresql.service" ]; @@ -210,7 +210,7 @@ in serviceConfig.RemainAfterExit = true; }; - systemd.services."hydra-server" = + systemd.services.hydra-server = { wantedBy = [ "multi-user.target" ]; requires = [ "hydra-init.service" ]; after = [ "hydra-init.service" ]; @@ -225,7 +225,7 @@ in }; }; - systemd.services."hydra-queue-runner" = + systemd.services.hydra-queue-runner = { wantedBy = [ "multi-user.target" ]; requires = [ "hydra-init.service" ]; after = [ "hydra-init.service" "network.target" ]; @@ -239,7 +239,7 @@ in }; }; - systemd.services."hydra-evaluator" = + systemd.services.hydra-evaluator = { wantedBy = [ "multi-user.target" ]; requires = [ "hydra-init.service" ]; after = [ "hydra-init.service" "network.target" ]; @@ -252,7 +252,7 @@ in }; }; - systemd.services."hydra-update-gc-roots" = + systemd.services.hydra-update-gc-roots = { requires = [ "hydra-init.service" ]; after = [ "hydra-init.service" ]; environment = env; @@ -263,6 +263,16 @@ in startAt = "02:15"; }; + systemd.services.hydra-send-stats = + { wantedBy = [ "multi-user.target" ]; + after = [ "hydra-init.service" ]; + environment = env; + serviceConfig = + { ExecStart = "@${cfg.package}/bin/hydra-send-stats hydra-send-stats"; + User = "hydra"; + }; + }; + services.cron.systemCronJobs = let # If there is less than ... GiB of free disk space, stop the queue diff --git a/src/script/Makefile.am b/src/script/Makefile.am index ce612f37..9b389bd4 100644 --- a/src/script/Makefile.am +++ b/src/script/Makefile.am @@ -10,6 +10,7 @@ distributable_scripts = \ hydra-s3-backup-collect-garbage \ hydra-create-user \ hydra-notify \ + hydra-send-stats \ nix-prefetch-git \ nix-prefetch-bzr \ nix-prefetch-hg