Skip to content

Commit b1ff822

Browse files
committed
Repeat 3time in case of send_to_paste_bin failed after 3secongs.
Add Costas also to upstream_mails Signed-off-by: Petr "Stone" Hracek <[email protected]>
1 parent 465726b commit b1ff822

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Diff for: daily_tests/daily_nightly_tests_report.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import smtplib
55
import argparse
66
import subprocess
7+
import time
78

89
from email.mime.multipart import MIMEMultipart
910
from email.mime.text import MIMEText
@@ -19,6 +20,7 @@
1920
upstream_mails = [
2021
2122
23+
2224
2325
]
2426

@@ -202,10 +204,14 @@ def send_file_to_pastebin(self, log_path, log_name: str):
202204
send_paste_bin = os.getenv("HOME") + "/ci-scripts/send_to_paste_bin.sh"
203205
cmd = f'{send_paste_bin} "{log_path}" "{log_name}"'
204206
print(f"sending logs to pastebin: {cmd}")
205-
try:
206-
run_command(cmd)
207-
except subprocess.CalledProcessError:
208-
pass
207+
for count in range(5):
208+
try:
209+
run_command(cmd)
210+
break
211+
except subprocess.CalledProcessError:
212+
print(f"ERROR: Sending to pastebin by command {cmd} failed")
213+
pass
214+
time.sleep(3)
209215

210216
def get_pastebin_url(self, log_name: str) -> str:
211217
with open(log_name, "r") as f:

0 commit comments

Comments
 (0)