Sha256: f74980945653b47e9cc60a69c4ed391b497f600230f14ee581d8c0e50f1f4123

Contents?: true

Size: 523 Bytes

Versions: 4

Compression:

Stored size: 523 Bytes

Contents

module Apress
  module Api
    class DelayedFireCallback
      include Interactor

      delegate :event, :params, to: :context
      def call
        services = Apress::Api::Callbacks::Config.services(event)

        return if services.blank?

        ::Resque.redis.multi do
          services.each do |service|
            ::Resque.enqueue(
              ::Apress::Api::FireCallbackJob,
              service,
              event,
              params
            )
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
apress-api-1.24.0 app/interactors/apress/api/delayed_fire_callback.rb
apress-api-1.23.0 app/interactors/apress/api/delayed_fire_callback.rb
apress-api-1.22.1 app/interactors/apress/api/delayed_fire_callback.rb
apress-api-1.22.0 app/interactors/apress/api/delayed_fire_callback.rb