From d0ff3e48d17a46f6ede646d34b42baeb60fa71a4 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Sun, 9 Jun 2019 14:25:35 +0000 Subject: [PATCH] Suppress progress for git gc cron on Gitea servers The stdout progress feed from `git gc` is fairly verbose and targeted at audiences running it interactively. Since our cron for this iterates over thoudands of repositories on our Gitea servers, we don't need to send the progress info to all our sysadmins by E-mail. Instead use the --quiet option to the gc subcommand so that progress output will be suppressed. If this still proves too verbose (as in, continues to result in E-mail to root even when there are no failures), we can try redirecting stdout to /dev/null. Change-Id: Idc06e48cbf85e127a343c2a3cf51a35e6ed09685 --- playbooks/roles/gitea/tasks/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/roles/gitea/tasks/main.yaml b/playbooks/roles/gitea/tasks/main.yaml index 3d0f0b5b61..aa56fe5f82 100644 --- a/playbooks/roles/gitea/tasks/main.yaml +++ b/playbooks/roles/gitea/tasks/main.yaml @@ -130,7 +130,7 @@ cron: name: pack-git-refs state: present - job: "docker exec -t giteadocker_gitea-web_1 find /data/git/repositories/ -maxdepth 2 -name *.git -type d -execdir git --git-dir={} gc \\;" + job: "docker exec -t giteadocker_gitea-web_1 find /data/git/repositories/ -maxdepth 2 -name *.git -type d -execdir git --git-dir={} gc --quiet \\;" minute: 37 hour: 12 weekday: 0