Sha256: 39c9faab827e10b2b8bea1b3d153d6fd2efccf705bd4ecd0c9d9c95e697c6491
Contents?: true
Size: 789 Bytes
Versions: 2
Compression:
Stored size: 789 Bytes
Contents
#!ruby # Go here to start from app's root directory. Dir.chdir File.expand_path(File.dirname(__FILE__) + "/..") # If using Bundler, you might need to uncomment next two lines #require "bundler" #Bundler.setup require "resque/forker" # Load the application. Resque.setup do |forker| $:.unshift Dir.pwd # Makes 1.9.2 happy require "config/environment" ActiveRecord::Base.connection.disconnect! forker.options.interval = 1 if Rails.env.production? forker.logger = Rails.logger forker.workload = ["*"] * 4 # 4 workers on all queues forker.user "www-data", "www-data" # don't run as root else forker.options.verbose = true end end # Stuff to do after forking a worker. Resque.before_first_fork do ActiveRecord::Base.establish_connection end Resque.fork!
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
resque-forker-1.2.1 | script/workers |
resque-forker-1.2.0 | script/workers |