Increased performance on POP3 verify.
This commit is contained in:
parent
5dbe603a5a
commit
acd7d5c52c
1 changed files with 10 additions and 2 deletions
|
@ -26,9 +26,17 @@ class Channel::POP3 < Channel::EmailParser
|
||||||
elsif check_type == 'verify'
|
elsif check_type == 'verify'
|
||||||
puts "verify mode, fetch no emails"
|
puts "verify mode, fetch no emails"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
mails = @pop.mails
|
||||||
count = 0
|
count = 0
|
||||||
count_all = @pop.mails.size
|
count_all = mails.size
|
||||||
@pop.each_mail do |m|
|
|
||||||
|
# reverse message order to increase performance
|
||||||
|
if check_type == 'verify'
|
||||||
|
mails.reverse!
|
||||||
|
end
|
||||||
|
|
||||||
|
mails.each do |m|
|
||||||
count += 1
|
count += 1
|
||||||
puts " - message #{count.to_s}/#{count_all.to_s}"
|
puts " - message #{count.to_s}/#{count_all.to_s}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue