Added que init script #2724

This commit is contained in:
Priit Tark 2015-07-01 14:10:49 +03:00
parent a2e6603ecc
commit 2324d08394
18 changed files with 178 additions and 293 deletions

17
lib/daemons/que.rb Executable file
View file

@ -0,0 +1,17 @@
#!/usr/bin/env ruby
ENV["RAILS_ENV"] ||= "production"
root = File.expand_path(File.dirname(__FILE__))
root = File.dirname(root) until File.exists?(File.join(root, 'config'))
Dir.chdir(root)
require File.join(root, "config", "environment")
$running = true
Signal.trap("TERM") do
$running = false
end
while($running) do
end