Unified ferret_start and ferret_stop

I would like to unify the ferret_start and ferret_stop scripts into a
single script. My motivation is to make the scripts more like the other
rails scripts, and to also make it fit into monitoring schemes better.
I realize that some work was done recently to allow the scripts to be
run from script/runner, but I think a unified script is a better
approach.

A unified script would allow more advanced command line processing
without duplication. For example, being able to supply the RAILS_ENV on
the command line, and overriding configuration options such as the PID
file.

Would there be any objection to me submitting patches that unified these
two scripts? Here is what I would expect them to look like in the
future (after my patches):

script/ferretd -e production start
script/ferretd -e production stop

Hi!

sounds great, just go ahead :slight_smile:

cheers,
Jens

On Mon, Oct 08, 2007 at 06:51:44PM +0200, Peter J. wrote:

file.
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk


Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
[email protected] | www.webit.de

Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa

I’ve tweaked the ferret server scripts a bit. Made them a little more
modular. Peter, feel free to email me if you want to discuss things.

Also, I’m learning about threading and forking. My tentative thought is
that the use ‘safefork’ (a while loop encapsulating a Kernel#fork) might
be
able to be improved upon. The examples in The Ruby Way by Fulton seem
cleaner – they don’t use Kernel#fork. Again, all of this is tentative;
just thinking out loud.

Can we have a look at the source?

(sorry if I’m missing something and you already put it somewhere)

I’ve attached my first set of changes. The attached archive includes a
README file with information about what I’ve changed and why.

These changes are only for Unix-like operating systems, for now. If you
like the changes I’ve made, I’ll integrate the Windows code from the
various scripts in the script directory.

Let me know if you have any questions.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs