Sha256: 65011891e3f71647ed86cf9db253a93a17f758520bc0a3b2e760ba80f203d29e
Contents?: true
Size: 403 Bytes
Versions: 1
Compression:
Stored size: 403 Bytes
Contents
# frozen_string_literal: true require 'request_store_rails' module LazyResque # Per thread store that uses RequestLocals to store all the enqueues # we want to run module Store def self.queue RequestLocals.fetch(:lazy_resque_queue) { [] } || [] end def self.queue_up(lazy_enqueue) RequestLocals.store[:lazy_resque_queue] = queue.concat([lazy_enqueue]) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lazy_resque-0.0.1 | lib/lazy_resque/store.rb |