Skip to content

Commit

Permalink
Longer sleeps
Browse files Browse the repository at this point in the history
  • Loading branch information
parterburn committed Jan 9, 2024
1 parent 853038d commit 6e95658
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/lib/email_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ def collage_from_mailgun_attachments
resp = connection.get("/v3/#{ENV['SMTP_DOMAIN']}/events?pretty=yes&event=accepted&ascending=no&limit=1&message-id=#{@message_id}")
last_message = resp.body&.dig("items", 0) if resp.success?
break if last_message.present?
sleep 2
sleep 10
end
return unless last_message.present?

Expand All @@ -379,7 +379,7 @@ def collage_from_mailgun_attachments
response = msg_conn.get(message_url.path)
message = response.body if response.success?
break if message.present?
sleep 2
sleep 10
end
return unless message.body["recipients"].to_s.include?(@user.user_key) || message.body["from"].to_s.include?(@user.email)

Expand Down

0 comments on commit 6e95658

Please sign in to comment.