Distinguish the spawners for different processes


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4324 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 2b0a1f4a
*SVN*
* Distinguish the spawners for different processes [DHH]
* Added -n/--process to script/process/spawner name the process pid (default is dispatch) [DHH]
* Namespaced OrderedHash so the Rails implementation does not clash with any others. (fixes #4911) [Julian Tarkhanov]
......
......@@ -14,7 +14,7 @@ def daemonize #:nodoc:
end
class Spawner
def self.record_pid(name = "spawner", id = Process.pid)
def self.record_pid(name = "#{OPTIONS[:process]}.spawner", id = Process.pid)
FileUtils.mkdir_p(OPTIONS[:pids])
File.open(File.expand_path(OPTIONS[:pids] + "/#{name}.pid"), "w+") { |f| f.write(id) }
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册