Skip to content

Repeat 3times in case of send_to_paste_bin failed after 3seconds #167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions daily_tests/daily_nightly_tests_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import smtplib
import argparse
import subprocess
import time

from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
Expand All @@ -19,6 +20,7 @@
upstream_mails = [
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
]

Expand Down Expand Up @@ -202,10 +204,14 @@ def send_file_to_pastebin(self, log_path, log_name: str):
send_paste_bin = os.getenv("HOME") + "/ci-scripts/send_to_paste_bin.sh"
cmd = f'{send_paste_bin} "{log_path}" "{log_name}"'
print(f"sending logs to pastebin: {cmd}")
try:
run_command(cmd)
except subprocess.CalledProcessError:
pass
for count in range(5):
try:
run_command(cmd)
break
except subprocess.CalledProcessError:
print(f"ERROR: Sending to pastebin by command {cmd} failed")
pass
time.sleep(3)

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