Method: At_email::Tasks::Imap_To_Fs#queue_thread

Defined in:
lib/at_email/tasks/imap_to_fs.rb

#queue_thread(folder_name, uid, msg_ratio) ⇒ Object



381
382
383
384
385
386
387
388
389
390
391
# File 'lib/at_email/tasks/imap_to_fs.rb', line 381

def queue_thread(folder_name, uid, msg_ratio)
  set_thread_state(folder_name, uid, msg_ratio, 'Queued')
  bootstrap_thread(folder_name, uid)
  set_thread_property(folder_name, uid, 'Queue Time', Time.now)
  increase_thread_count(folder_name)
  Thread.abort_on_exception = true
  @account_metadata[:folders][folder_name]['process']['threads']['uids'][uid]['Thread'] = Thread.new do
    sleep 0.1
    write_data_for_uid(folder_name, uid, msg_ratio)
  end
end