Skip to content

Commit

Permalink
Fix issue with too many requests retries
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickfav committed Sep 28, 2019
1 parent bc2a0e4 commit 7697bd9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/at/favre/tools/rocketexporter/cli/Export.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ public void run() {
toExport.add(allConversations.get(selection));
}

for (Conversation selectedGroup : toExport) {
for (int i = 0; i < toExport.size(); i++) {
Conversation selectedGroup = toExport.get(i);

final List<Message> messages;
final ExportFormat format = new SlackCsvFormat();
final int offset = 0;
Expand All @@ -149,6 +151,7 @@ public void run() {
} catch (TooManyRequestException e) {
out.println("Too many requests. Slowing down...");
Thread.sleep(5000);
i--;
}
}
} catch (Exception e) {
Expand Down

0 comments on commit 7697bd9

Please sign in to comment.