Skip to content

Commit

Permalink
Add a sleep to the notifyPendingCI and notifyStale files if getting a…
Browse files Browse the repository at this point in the history
… list fails
  • Loading branch information
pmaslana committed May 14, 2024
1 parent 3b6a497 commit 59c21f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/notifyPendingCI.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ var notifyPendingCICmd = &cobra.Command{
listPendingPRs, err = github2.CheckForPendingCI(client, cfg.InternalTeam, cfg.CheckStalePending)
if err != nil {
log.Printf("The following error occurred while obtaining a list of pending PRs: %s", err)
time.Sleep(loopDuration)
continue
}
log.Printf("Pending PRs ready for CI: %v\n", listPendingPRs)
Expand Down
1 change: 1 addition & 0 deletions cmd/notifyStale.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ var notifyStaleCmd = &cobra.Command{
_, err = github2.CheckStalePRs(client, cfg.InternalTeam, cfg.CheckStalePending)
if err != nil {
log.Printf("The following error occurred while obtaining a list of stale PRs: %s", err)
time.Sleep(loopDuration)
continue
}
log.Printf("Stale PRs: %v\n", listPendingPRs)
Expand Down

0 comments on commit 59c21f2

Please sign in to comment.