./lib/lux/delayed_job/lib/memory.rb in lux-fw-0.2.3 vs ./lib/lux/delayed_job/lib/memory.rb in lux-fw-0.5.32
- old
+ new
@@ -1,14 +1,16 @@
module Lux::DelayedJob::Memory
extend self
- @@JOBS = []
+ @jobs = []
- def push(data)
- @@JOBS.push data
- Thread.new { true while Lux::DelayedJob.pop }
+ def push data
+ @jobs.push data
+
+ # delayed jobs in memory are resolved asap
+ Thread.new { true while pop }
end
def pop
- @@JOBS.shift
+ @jobs.shift
end
end
\ No newline at end of file