Sha256: 16c90607c1841f6ff0fb81ec997c79c0e4a6c00d1581bfecc52afc654e67df43

Contents?: true

Size: 626 Bytes

Versions: 5

Compression:

Stored size: 626 Bytes

Contents

require 'delayed_job'
require 'yaml'

if YAML.parser.class.name =~ /syck|yecht/i
  require 'apartment/delayed_job/syck_ext'
else
  require 'apartment/delayed_job/psych_ext'
end

module Apartment
  module Delayed
    module Job

      # Will enqueue a job ensuring that it happens within the main 'public' database
      #
      # Note that this should not longer be required for versions >= 0.11.0 when using postgresql schemas
      #
      def self.enqueue(payload_object, options = {})
        Apartment::Database.process do
          ::Delayed::Job.enqueue(payload_object, options)
        end
      end

    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
apartment-0.22.1 lib/apartment/delayed_job/enqueue.rb
apartment-0.22.0 lib/apartment/delayed_job/enqueue.rb
apartment-0.21.1 lib/apartment/delayed_job/enqueue.rb
apartment-0.21.0 lib/apartment/delayed_job/enqueue.rb
apartment-0.20.0 lib/apartment/delayed_job/enqueue.rb