Skip to content

Commit

Permalink
Allow for a custom instance to be given. I append that to the hostnam…
Browse files Browse the repository at this point in the history
…e to allow for a collection of runners. Each is started and maintained by a cron job with its own --instance={some_number}. Each is also maintaining their own log file.
  • Loading branch information
Brian Cooke committed Sep 10, 2008
1 parent 31c4aa5 commit c34304a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions bin/bj
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,10 @@ txt
argument :required
cast :integer
}
option("--instance"){
argument :required
cast :string
}
option("--limit"){
argument :required
cast :integer
Expand All @@ -388,7 +392,7 @@ txt
end
=end

%w[ forever ppid wait limit ].each do |key|
%w[ forever ppid wait limit instance].each do |key|
options[key.to_sym] = param[key].value if param[key].given?
end

Expand All @@ -407,7 +411,11 @@ txt
info{ "SIGTERM" }
exit
}


if param["instance"].given?
Bj.hostname = Bj.hostname + "." + param["instance"].value
end

if param["daemon"].given?
daemon{ Bj.run options }
else
Expand Down

0 comments on commit c34304a

Please sign in to comment.