post-receive: Sleep a bit to give the Humbug server time to restart.

(imported from commit 95e9e7110dcca19347e3cb3952ac18960b500586)
This commit is contained in:
Tim Abbott 2012-10-03 17:01:15 -04:00
parent 83ceba0a2d
commit 303bc7c6b8
1 changed files with 4 additions and 0 deletions

View File

@ -15,6 +15,7 @@
import os import os
import sys import sys
import subprocess import subprocess
import time
sys.path.append(os.path.dirname(os.path.dirname(os.readlink(__file__)))) sys.path.append(os.path.dirname(os.path.dirname(os.readlink(__file__))))
import api.common 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, "content": "The following commits were just pushed to %s:\n\n" % (refname.replace("refs/heads/", ""),) + commits,
"recipient": "tabbott@humbughq.com", "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) client.send_message(message_data)
for ln in sys.stdin: for ln in sys.stdin: