Skip to content
This repository has been archived by the owner on Dec 30, 2019. It is now read-only.

Commit

Permalink
always wait full delay (credit cyu)
Browse files Browse the repository at this point in the history
  • Loading branch information
adzap committed Dec 18, 2009
1 parent e2e5665 commit 69cf1f8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/action_mailer/ar_sendmail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -456,15 +456,14 @@ def run
install_signal_handlers

loop do
now = Time.now
begin
cleanup
emails = find_emails
deliver(emails) unless emails.empty?
rescue ActiveRecord::Transactions::TransactionError
end
break if @once
sleep @delay if now + @delay > Time.now
sleep @delay
end
end

Expand Down

0 comments on commit 69cf1f8

Please sign in to comment.