Skip to content

Add retry when retrieving PR information#284

Open
bkhouri wants to merge 1 commit into
swiftlang:mainfrom
bkhouri:t/main/gh283_add_retry_when_downloading_pr_data
Open

Add retry when retrieving PR information#284
bkhouri wants to merge 1 commit into
swiftlang:mainfrom
bkhouri:t/main/gh283_add_retry_when_downloading_pr_data

Conversation

@bkhouri

@bkhouri bkhouri commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Fixes: #283

@bkhouri bkhouri marked this pull request as ready for review June 15, 2026 18:47
@bkhouri bkhouri requested a review from a team as a code owner June 15, 2026 18:47
@bkhouri bkhouri force-pushed the t/main/gh283_add_retry_when_downloading_pr_data branch from 9b9d7c4 to aa1bf5c Compare June 15, 2026 18:49
print(
"Failed to load PR info from \(prInfoUrl) (attempt \(attempt) of \(maxAttempts)): \(error). Retrying in \(delaySeconds)s..."
)
try await Task.sleep(nanoseconds: delaySeconds * 1_000_000_000)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think something like this should be possible, which reads a little nicer.

Suggested change
try await Task.sleep(nanoseconds: delaySeconds * 1_000_000_000)
try await Task.sleep(for: .seconds(delaySeconds))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cross-repo fails with failed to load PR info

2 participants