Sleep between calling webhooks #21

Merged
PeterSurda merged 1 commits from sleep into master 2022-06-02 15:26:16 +02:00

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__":