Class: Resque::Worker

Inherits:
Object
  • Object
show all
Defined in:
lib/bizside/resque.rb

Instance Method Summary collapse

Instance Method Details

#reserveObject



54
55
56
57
58
59
60
61
62
# File 'lib/bizside/resque.rb', line 54

def reserve
  stop_file_path = File.join('tmp', 'stop.txt')
  if File.exist?(stop_file_path)
   puts "#{Resque.redis.namespace} #{stop_file_path} が存在するため一時停止します。"
   nil
  else
    reserve_without_stop_txt
  end
end

#reserve_without_stop_txtObject



52
# File 'lib/bizside/resque.rb', line 52

alias_method :reserve_without_stop_txt, :reserve