Sha256: ae3e1dae56beac0e2e8c4799480618c2bbbd67abe19556903000ec91758f5f3f
Contents?: true
Size: 491 Bytes
Versions: 5
Compression:
Stored size: 491 Bytes
Contents
module Workarea module MailChimp class ListUnsubscriber include Sidekiq::Worker include Sidekiq::CallbacksWorker sidekiq_options( enqueue_on: { Email::Signup => [:destroy], with: -> { [email] } }, queue: "low", retry: true ) def perform(email) User.find_by_email(email)&.update_attributes(email_signup: false) Workarea::MailChimp.gateway.unsubscribe(email) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems