Permalink
Browse files

always wait full delay (credit cyu)

  • Loading branch information...
1 parent e2e5665 commit 69cf1f896aff12fa3904de3641e0e2754f6eda80 @adzap committed Dec 18, 2009
Showing with 1 addition and 2 deletions.
  1. +1 −2 lib/action_mailer/ar_sendmail.rb
@@ -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

0 comments on commit 69cf1f8

Please sign in to comment.