Skip to content

Commit

Permalink
Simplify bin/processor by not daemonizing.
Browse files Browse the repository at this point in the history
That is taken care of by the upstart script, which can daemonize it and
keep track of its status.
  • Loading branch information
Renato Mascarenhas committed Jun 10, 2016
1 parent 2f0713d commit d70117c
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions bin/processor
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,5 @@
require "./config/environment"
Hanami::Application.preload!

# keeps a copy of the current STDIN so that we can write feedback to the terminal
# after becoming a daemon process, where the stdin/stdout streams are set to
# /dev/null
old_stdin = File.open(STDIN.fileno, File::RDWR).dup

# become a daemon process.
Process.daemon(true)

prefork = ENV["CONCIERGE_WORKERS_PREFORK"].to_i
old_stdin.puts "Forked to background, pid #{$$}. Creating #{prefork} workers"

Workers::Processor::Master.new(prefork: prefork).load!

0 comments on commit d70117c

Please sign in to comment.