Sha256: 905115616e93331890bceebd8b2cafc5ef6137feaa95c1577f308821ea45d4ad

Contents?: true

Size: 519 Bytes

Versions: 1

Compression:

Stored size: 519 Bytes

Contents

module Delayed
  module Backend
    module Json
      module Patch
        def payload_object=(object)
          @payload_object = object
          self.handler = '{}'
          self.payload = object.job_data
        end

        def payload_object
          if payload.present?
            @payload_object ||= ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper.new(payload)
          else
            super
          end
        end
      end
    end
  end
end

Delayed::Job.prepend Delayed::Backend::Json::Patch

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
delayed_job_json-1.0.0 lib/delayed/backend/json/patch.rb