Sha256: 2f06a35274142b5be5b993d332c70085c572b3a379ce218ee112465fce88a86c

Contents?: true

Size: 386 Bytes

Versions: 4

Compression:

Stored size: 386 Bytes

Contents

module Apress
  module Api
    class EventHandlerEnqueueingJob
      include Resque::Integration

      queue :api_callbacks

      def self.perform(handler, event_params)
        job = handler.camelize.constantize

        if job.respond_to?(:enqueue)
          job.enqueue(event_params)
        else
          Resque.enqueue(job, event_params)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
apress-api-1.24.0 app/jobs/apress/api/event_handler_enqueueing_job.rb
apress-api-1.23.0 app/jobs/apress/api/event_handler_enqueueing_job.rb
apress-api-1.22.1 app/jobs/apress/api/event_handler_enqueueing_job.rb
apress-api-1.22.0 app/jobs/apress/api/event_handler_enqueueing_job.rb