Skip to content

Commit 01da0ac

Browse files
committed
Add backoff
1 parent f4e9bcb commit 01da0ac

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

app/commands/user/sync_to_kit.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ def call
1212

1313
new_sub = add_subscriber!
1414
add_to_form! if new_sub
15+
rescue RestClient::TooManyRequests
16+
requeue_job!(rand(10..119)) # Backoff for between 10 and 120 seconds (space them out)
1517
end
1618

1719
private

0 commit comments

Comments
 (0)