From 85908702c9ae20b9413cef312b7fb0db372c9401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20=C5=A0urda?= Date: Thu, 2 Jun 2022 21:24:21 +0800 Subject: [PATCH] Sleep between calling webhooks --- lib/worker_multibuild.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/worker_multibuild.py b/lib/worker_multibuild.py index f5d4c95..9fd3f34 100644 --- a/lib/worker_multibuild.py +++ b/lib/worker_multibuild.py @@ -3,6 +3,7 @@ from os.path import exists, isfile, islink, join, realpath import requests import re from subprocess import Popen, PIPE +from time import sleep request_data = { @@ -94,6 +95,7 @@ ENTRYPOINT /usr/local/bin/buildbot_entrypoint.sh "$BUILDMASTER" "$WORKERNAME" "$ """ + def get_secret(): with open("multibuild_parent_key.key", 'r') as f: data = f.read() @@ -222,6 +224,7 @@ def trigger_child_hooks(buildbotUrl: str, repository, branch, revision, json=request_data) print("Triggered job for {} on {}: {}".format(job, request_url, retval.text)) + sleep(1) if __name__ == "__main__":