aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/jobs
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2018-09-17 16:55:07 -0700
committerDavid Heinemeier Hansson <david@loudthinking.com>2018-09-17 16:55:07 -0700
commit627bbd34e142fa7caff49fd660a9a586f3ed6826 (patch)
treec068e6a777d7fd7441f7fb6c5cbfb9e6e3bf29c6 /app/models/jobs
parent52b1e2c6cfd5e76d72a6de09b28e51f2440c48c4 (diff)
downloadrails-627bbd34e142fa7caff49fd660a9a586f3ed6826.tar.gz
rails-627bbd34e142fa7caff49fd660a9a586f3ed6826.tar.bz2
rails-627bbd34e142fa7caff49fd660a9a586f3ed6826.zip
Add inbound email
Diffstat (limited to 'app/models/jobs')
-rw-r--r--app/models/jobs/action_mailbox/deliver_inbound_email_to_mailbox.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/models/jobs/action_mailbox/deliver_inbound_email_to_mailbox.rb b/app/models/jobs/action_mailbox/deliver_inbound_email_to_mailbox.rb
new file mode 100644
index 0000000000..a5bd2c0f18
--- /dev/null
+++ b/app/models/jobs/action_mailbox/deliver_inbound_email_to_mailbox.rb
@@ -0,0 +1,10 @@
+class ActionMailbox::DeliverInboundEmailToMailroomJob < ApplicationJob
+ queue_as :action_mailbox_inbound_email
+
+ # Occasional `SSL_read: decryption failed or bad record mac` that resolve on retry
+ retry_on OpenSSL::SSL::SSLError
+
+ def perform(inbound_email)
+ ApplicationMailbox.receive inbound_email
+ end
+end