Skip to content

Commit

Permalink
Only retry for rate limit errors
Browse files Browse the repository at this point in the history
Other kinds of errors won't go away after just waiting for a while.
  • Loading branch information
PeterJCLaw committed Jan 27, 2022
1 parent a138910 commit cdd35b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/import_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def submit(self, ticket: Ticket) -> int:
# limit us anyway...

def retry_on_exception(exception: Exception) -> bool:
return isinstance(exception, github.GithubException)
return isinstance(exception, github.RateLimitExceededException)

@retrying.retry(
retry_on_exception=retry_on_exception,
Expand Down

0 comments on commit cdd35b1

Please sign in to comment.