Skip to content

Commit

Permalink
Small delay before attempting a rename
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmuscaria committed Jan 7, 2025
1 parent 9502d89 commit 503d2df
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion archiver.java
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,19 @@ public Integer call() throws Exception {
} catch (Exception e) {
// No repo found, let's fork it!
fork = originalGitHubRepo.forkTo(org);
fork.renameTo(newId);
int attempt = 0;
while (true) {
try {
Thread.sleep(1000);
fork.renameTo(newId);
break;
} catch (Exception ex) {
attempt++;
if (attempt > 3) {
throw ex;
}
}
}
fork = github.getRepository(orgName + '/' + newId);
}

Expand Down

0 comments on commit 503d2df

Please sign in to comment.