./lib/lux/delayed_job/delayed_job.rb in lux-fw-0.1.35 vs ./lib/lux/delayed_job/delayed_job.rb in lux-fw-0.2.1

- old
+ new

@@ -1,18 +1,18 @@ module Lux::DelayedJob extend self @@server = nil - def server=(name) + def server= name adapter = "Lux::DelayedJob::#{name.to_s.capitalize}" @@server = adapter.constantize rescue NameError - die('No adapter %s not found' % adapter) + die 'No adapter %s not found' % adapter end - def push(object, method_to_call=nil) + def push object, method_to_call=nil die "No DelayedJob server defined" unless @@server @@server.push [object, method_to_call] end def pop @@ -29,10 +29,10 @@ eval(obj) end true end - def run!(seconds=2) + def run! seconds=2 puts "JOB QUE> is running for #{@@server}".green Thread.new do while true print '.' true while Lux::DelayedJob.pop