Sha256: 387268180e73ebbc6f04de9d1c4122dfbd36985d7784960c9f26301209fa70e5

Contents?: true

Size: 339 Bytes

Versions: 12

Compression:

Stored size: 339 Bytes

Contents

module BridgeCache
  module Utils
    module WorkerHelper
      def self.invoke_next(job_chain, params = [])
        job_chain ||= []
        job = job_chain.shift

        return unless job

        job_class = Object.const_get(job[:job].classify)
        job_class.perform_later(*job[:params].concat(params))
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
bridge_cache-0.4.7 app/lib/bridge_cache/utils/worker_helper.rb
bridge_cache-0.4.6 app/lib/bridge_cache/utils/worker_helper.rb
bridge_cache-0.4.5 app/lib/bridge_cache/utils/worker_helper.rb
bridge_cache-0.4.4 app/lib/bridge_cache/utils/worker_helper.rb
bridge_cache-0.4.3 app/lib/bridge_cache/utils/worker_helper.rb
bridge_cache-0.4.2 app/lib/bridge_cache/utils/worker_helper.rb
bridge_cache-0.4.1 app/lib/bridge_cache/utils/worker_helper.rb
bridge_cache-0.3.24 app/lib/bridge_cache/utils/worker_helper.rb
bridge_cache-0.3.23 app/lib/bridge_cache/utils/worker_helper.rb
bridge_cache-0.3.22 app/lib/bridge_cache/utils/worker_helper.rb
bridge_cache-0.3.21 app/lib/bridge_cache/utils/worker_helper.rb
bridge_cache-0.3.20 app/lib/bridge_cache/utils/worker_helper.rb