Sleep between calling webhooks

This commit is contained in:
Peter Šurda 2022-06-02 21:24:21 +08:00
parent 7929e6dd37
commit 85908702c9
Signed by untrusted user: PeterSurda
GPG Key ID: 3E47497CF67ABB95

View File

@ -3,6 +3,7 @@ from os.path import exists, isfile, islink, join, realpath
import requests import requests
import re import re
from subprocess import Popen, PIPE from subprocess import Popen, PIPE
from time import sleep
request_data = { request_data = {
@ -94,6 +95,7 @@ ENTRYPOINT /usr/local/bin/buildbot_entrypoint.sh "$BUILDMASTER" "$WORKERNAME" "$
""" """
def get_secret(): def get_secret():
with open("multibuild_parent_key.key", 'r') as f: with open("multibuild_parent_key.key", 'r') as f:
data = f.read() data = f.read()
@ -222,6 +224,7 @@ def trigger_child_hooks(buildbotUrl: str, repository, branch, revision,
json=request_data) json=request_data)
print("Triggered job for {} on {}: {}".format(job, request_url, print("Triggered job for {} on {}: {}".format(job, request_url,
retval.text)) retval.text))
sleep(1)
if __name__ == "__main__": if __name__ == "__main__":