Skip to content

Commit

Permalink
Add a 30 second sleep in mass_comment.py to avoid overwhelming Jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
damccorm authored Mar 3, 2023
1 parent 60ac6ef commit 492a9b8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions release/src/main/scripts/mass_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@

"""Script for mass-commenting Jenkins test triggers on a Beam PR."""

import socket
import requests
import socket
import time

# This list can be found by querying the Jenkins API, see BEAM-13951
COMMENTS_TO_ADD = [
Expand Down Expand Up @@ -56,7 +57,6 @@
"Run Java Examples_Flink",
"Run Java Examples_Spark",
"Run Java Flink PortableValidatesRunner Streaming",
"Run Java Portability examples on Dataflow with Java 11",
"Run Java PostCommit",
"Run Java PreCommit",
"Run Java Samza PortableValidatesRunner",
Expand Down Expand Up @@ -223,6 +223,8 @@ def postComments(accessToken, subjectId):

for commentBody in COMMENTS_TO_ADD:
jsonData = fetchGHData(accessToken, subjectId, commentBody)
# Space out comments 30 seconds apart to avoid overwhelming Jenkins
time.sleep(30)
print(jsonData)


Expand Down

0 comments on commit 492a9b8

Please sign in to comment.