David James
2008-Apr-07 16:26 UTC
[Ferret-talk] patch to warn that "ferret_server appears to be already running"
Hi, I added the following two lines to the top of the start method in ferret_server.rb (acts_as_ferret) pid = read_pid_file raise "ferret_server appears to be already running" if pid Without this, I found that: 1. I could do ''script/ferret_start -e production start'' multiple times without getting a warning message. 2. Running script/ferret_start... a 2nd time managed to kill an already existing pid file, but left the old process running. 3. My capistrano deployments were sometimes confusing (based on the above two items) -David
David James
2008-Apr-07 18:10 UTC
[Ferret-talk] patch to warn that "ferret_server appears to be already running"
Update: I now prefer to use $stdout.puts instead of ''raise'' -- because I don''t consider this situation to be exceptional -- and I don''t want Capistrano to treat this situation as an error and halt. On Mon, Apr 7, 2008 at 12:26 PM, David James <davidj503 at gmail.com> wrote:> Hi, > > I added the following two lines to the top of the start method in > ferret_server.rb (acts_as_ferret) > > pid = read_pid_file > raise "ferret_server appears to be already running" if pid
Jens Kraemer
2008-Apr-10 22:10 UTC
[Ferret-talk] patch to warn that "ferret_server appears to be already running"
Hi, acts_as_ferret''s current trunk already has something similar in lib/unix_daemon.rb Cheers, Jens On Mon, Apr 07, 2008 at 02:10:53PM -0400, David James wrote:> Update: I now prefer to use $stdout.puts instead of ''raise'' -- because > I don''t consider this situation to be exceptional -- and I don''t want > Capistrano to treat this situation as an error and halt. > > On Mon, Apr 7, 2008 at 12:26 PM, David James <davidj503 at gmail.com> wrote: > > Hi, > > > > I added the following two lines to the top of the start method in > > ferret_server.rb (acts_as_ferret) > > > > pid = read_pid_file > > raise "ferret_server appears to be already running" if pid > _______________________________________________ > Ferret-talk mailing list > Ferret-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/ferret-talk >-- Jens Kr?mer Finkenlust 14, 06449 Aschersleben, Germany VAT Id DE251962952 http://www.jkraemer.net/ - Blog http://www.omdb.org/ - The new free film database