From 014bc3b72e05b0d7d3ce9f03cec10f6d8ae03874 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 20 Mar 2019 11:17:56 -0700 Subject: [PATCH] Timeout generation of e-r graphs Add a four hour timeout to the generation of e-r graphs as these scripts occasiaonlly run for days without exiting. We'd rather fail then try again later to ensure the graphs are mostly up to date. Change-Id: I7ee1c94c41edb9d6b5aeedebac64aeded1cf0e97 --- files/er_safe_run.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/er_safe_run.sh b/files/er_safe_run.sh index e4b053a..2de5f91 100755 --- a/files/er_safe_run.sh +++ b/files/er_safe_run.sh @@ -1,3 +1,5 @@ #!/bin/bash -flock -w 3600 /var/lib/elastic-recheck/er_safe_run.lock $@ +# Timeout after 4 hours as we've seen this script occasionally fail to +# exit after running for days. +flock -w 3600 timeout -k 60 14400 /var/lib/elastic-recheck/er_safe_run.lock $@