Chatwoot/app/jobs/inboxes/fetch_imap_email_inboxes_job.rb
Sojan Jose 009abc1948
chore: API improvements (#3637)
- Unique validations for Inbox members and Team member objects
- Move notification processing to Async
2021-12-21 22:48:01 +05:30

9 lines
269 B
Ruby

class Inboxes::FetchImapEmailInboxesJob < ApplicationJob
queue_as :low
def perform
Inbox.where(channel_type: 'Channel::Email').all.each do |inbox|
::Inboxes::FetchImapEmailsJob.perform_later(inbox.channel) if inbox.channel.imap_enabled
end
end
end