flipstone-ar_mailer 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/ar_mailer/ar_sendmail.rb +4 -4
  2. metadata +3 -3
@@ -42,7 +42,7 @@ class ArMailer::ARSendmail
42
42
  ##
43
43
  # The version of ArMailer::ARSendmail you are running.
44
44
 
45
- VERSION = '3.0.0'
45
+ VERSION = '3.0.1'
46
46
 
47
47
  ##
48
48
  # Maximum number of times authentication will be consecutively retried
@@ -98,7 +98,7 @@ class ArMailer::ARSendmail
98
98
  # to learn how to enable ActiveRecord::Timestamp.
99
99
 
100
100
  def self.mailq
101
- emails = ActionMailer::Base.email_class.find :all
101
+ emails = ArMailer::ActiveRecord.email_class.find :all
102
102
 
103
103
  if emails.empty? then
104
104
  puts "Mail queue is empty"
@@ -348,7 +348,7 @@ class ArMailer::ARSendmail
348
348
  return if @max_age == 0
349
349
  timeout = Time.now - @max_age
350
350
  conditions = ['last_send_attempt > 0 and created_on < ?', timeout]
351
- mail = ActionMailer::Base.email_class.destroy_all conditions
351
+ mail = ArMailer::ActiveRecord.email_class.destroy_all conditions
352
352
 
353
353
  log "expired #{mail.length} emails from the queue"
354
354
  end
@@ -428,7 +428,7 @@ class ArMailer::ARSendmail
428
428
  def find_emails
429
429
  options = { :conditions => ['failed_at IS NULL AND last_send_attempt < ?', Time.now.to_i - 300] }
430
430
  options[:limit] = batch_size unless batch_size.nil?
431
- mail = ActionMailer::Base.email_class.find :all, options
431
+ mail = ArMailer::ActiveRecord.email_class.find :all, options
432
432
 
433
433
  log "found #{mail.length} emails to send"
434
434
  mail
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 3
7
7
  - 0
8
- - 0
9
- version: 3.0.0
8
+ - 1
9
+ version: 3.0.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Eric Hodel
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-13 00:00:00 -05:00
18
+ date: 2011-01-21 00:00:00 -05:00
19
19
  default_executable: ar_sendmail
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency