Skip to content

Commit

Permalink
Increase retries when getting google sheet files to prevent rate limi…
Browse files Browse the repository at this point in the history
…t exceptions
  • Loading branch information
alexandre-pod committed Dec 12, 2023
1 parent 51f2034 commit 1072e6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ad_localize/repositories/drive_repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def download_sheets_by_id(spreadsheet_id:, sheet_ids:)
sheet_ids.filter_map do |sheet_id|
begin
url = export_url(spreadsheet_id: spreadsheet_id, sheet_id: sheet_id)
string = @drive_service.http(:get, url, options: { retries: 3, max_elapsed_time: 60 })
string = @drive_service.http(:get, url, options: { retries: 5, max_elapsed_time: 120 })
next unless string

tempfile = Tempfile.new
Expand Down

0 comments on commit 1072e6f

Please sign in to comment.