Improved error handling of channel streaming.
This commit is contained in:
parent
4c7309303f
commit
38ef22e4e5
2 changed files with 17 additions and 2 deletions
|
@ -142,7 +142,8 @@ stream all accounts
|
|||
current_channels = []
|
||||
channels = Channel.where('active = ? AND area LIKE ?', true, '%::Account')
|
||||
channels.each do |channel|
|
||||
adapter = channel.options[:adapter]
|
||||
adapter = channel.options[:adapter]
|
||||
next if adapter.blank?
|
||||
driver_class = Object.const_get("Channel::Driver::#{adapter.to_classname}")
|
||||
next if !driver_class.respond_to?(:streamable?)
|
||||
next if !driver_class.streamable?
|
||||
|
|
|
@ -60,7 +60,7 @@ example
|
|||
|
||||
=end
|
||||
|
||||
def fetch (options, channel, check_type = '', verify_string = '')
|
||||
def fetch(options, channel, check_type = '', verify_string = '')
|
||||
ssl = true
|
||||
port = 993
|
||||
keep_on_server = false
|
||||
|
@ -224,6 +224,20 @@ example
|
|||
@imap.disconnect()
|
||||
end
|
||||
|
||||
=begin
|
||||
|
||||
Channel::Driver::Imap.streamable?
|
||||
|
||||
returns
|
||||
|
||||
true|false
|
||||
|
||||
=end
|
||||
|
||||
def self.streamable?
|
||||
false
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def already_imported?(message_id, message_meta, count, count_all, keep_on_server)
|
||||
|
|
Loading…
Reference in a new issue