Sha256: 52cc4a5bb430bfe531c7f618761cd752b3a71aa3893f475f38ef77288e33d8ec

Contents?: true

Size: 445 Bytes

Versions: 4

Compression:

Stored size: 445 Bytes

Contents

module Workarea
  module Listrak
    class CustomerExporter
      include Sidekiq::Worker
      include Sidekiq::CallbacksWorker

      sidekiq_options(
        enqueue_on: {
          Workarea::User => :save
        }
      )

      def perform(user_id)
        user = Workarea::User.find user_id

        customer_form = Listrak::Models::CustomerForm.new user

        Listrak.data.customers.import [customer_form]
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
workarea-listrak-5.0.4 app/workers/workarea/listrak/customer_exporter.rb
workarea-listrak-5.0.3 app/workers/workarea/listrak/customer_exporter.rb
workarea-listrak-5.0.2 app/workers/workarea/listrak/customer_exporter.rb
workarea-listrak-5.0.1 app/workers/workarea/listrak/customer_exporter.rb