Use Active Jobs to spin Mailbluster requests off into a separate thread

This commit is contained in:
CactusPuppy 2021-03-25 16:40:04 -07:00
parent 671d010e68
commit 6373abf16a
No known key found for this signature in database
GPG key ID: 4B33B0A3E15E2C82

View file

@ -376,11 +376,15 @@ class User < ApplicationRecord
end
def mailbluster_create_lead
ApplicationController.helpers.create_lead(self)
MailblusterCreateLeadJob.perform_later self
end
def mailbluster_delete_lead
ApplicationController.helpers.delete_lead(self)
MailblusterDeleteLeadJob.perform_later self
end
def mailbluster_update_email
MailblusterEditLeadJob.perform_later(self, old_email: email_before_last_save)
end
def touch_events