Sha256: 385d17d9060d365f064397e5de53ff4d3863ac2ea183495b547daf0fc0a20324

Contents?: true

Size: 299 Bytes

Versions: 7

Compression:

Stored size: 299 Bytes

Contents

module Penthouse
  module ActiveJob
    extend ActiveSupport::Concern

    class_methods do
      def execute(job_data)
        Penthouse.switch(job_data['tenant']) do
          super
        end
      end
    end

    def serialize
      super.merge('tenant' => Penthouse.tenant)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
penthouse-0.13.2 lib/penthouse/active_job.rb
penthouse-0.13.1 lib/penthouse/active_job.rb
penthouse-0.13 lib/penthouse/active_job.rb
penthouse-0.12.2 lib/penthouse/active_job.rb
penthouse-0.12.1 lib/penthouse/active_job.rb
penthouse-0.12.0 lib/penthouse/active_job.rb
penthouse-0.11.0 lib/penthouse/active_job.rb