[sysadmin-bin] Wait up to 30s for command to finish



commit 3287535b1704a031fdcc77097006a03f381af727
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date:   Thu Jul 16 16:52:28 2020 +0200

    Wait up to 30s for command to finish

 git/post-receive-mirror-github | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/git/post-receive-mirror-github b/git/post-receive-mirror-github
index b2bafa5..c8cfd70 100755
--- a/git/post-receive-mirror-github
+++ b/git/post-receive-mirror-github
@@ -186,7 +186,7 @@ def run_command(command):
     try:
         out = tempfile.NamedTemporaryFile(prefix="github",suffix="std")
         err = tempfile.NamedTemporaryFile(prefix="github",suffix="err")
-        subprocess.check_call(shlex.split(command), stderr=subprocess.PIPE, stdout=out)
+        subprocess.check_call(shlex.split(command), stderr=subprocess.PIPE, stdout=out, timeout=30)
         out.close()
         err.close()
     except subprocess.CalledProcessError:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]