From 303bc7c6b89de1cd9343daa8cb860e22bc4bd896 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 3 Oct 2012 17:01:15 -0400 Subject: [PATCH] post-receive: Sleep a bit to give the Humbug server time to restart. (imported from commit 95e9e7110dcca19347e3cb3952ac18960b500586) --- tools/post-receive | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/post-receive b/tools/post-receive index 6fa450890d..61d3f235f1 100755 --- a/tools/post-receive +++ b/tools/post-receive @@ -15,6 +15,7 @@ import os import sys import subprocess +import time sys.path.append(os.path.dirname(os.path.dirname(os.readlink(__file__)))) import api.common @@ -48,6 +49,9 @@ def process_push(oldrev, newrev, refname): "content": "The following commits were just pushed to %s:\n\n" % (refname.replace("refs/heads/", ""),) + commits, "recipient": "tabbott@humbughq.com", } + # Sleep a bit to give time for the server to restart. + # TODO: Make this work without the sleep + time.sleep(1) client.send_message(message_data) for ln in sys.stdin: