Sha256: 637d19d6af45872c056f3484228bcf98b662228891c1cb06f3b622503922abd0

Contents?: true

Size: 416 Bytes

Versions: 1

Compression:

Stored size: 416 Bytes

Contents

# frozen_string_literal: true
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

1 entries across 1 versions & 1 rubygems

Version Path
apress-api-1.24.2 app/jobs/apress/api/event_handler_enqueueing_job.rb