From ace1c39c6181f0dfb57afb92a697ecc9fbaaf109 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Wed, 4 Sep 2019 05:15:21 +1000 Subject: [PATCH] gitea: use random time for git gc run Randomising the time of this job should help avoid a thundering herd of I/O intensive operations in the gitea environment. Change-Id: I035f7781a397665357b6d039b989ab9fe6a46b8a --- playbooks/roles/gitea/tasks/main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/roles/gitea/tasks/main.yaml b/playbooks/roles/gitea/tasks/main.yaml index 879ea07c22..3947119f20 100644 --- a/playbooks/roles/gitea/tasks/main.yaml +++ b/playbooks/roles/gitea/tasks/main.yaml @@ -132,8 +132,8 @@ 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 --quiet \\;" - minute: 37 - hour: 12 + minute: '{{ 59 | random(seed=inventory_hostname) }}' + hour: '{{ 23 | random(seed=inventory_hostname) }}' weekday: 0 - name: Create db backup dest file: