[Mongrel] Running some code right before the app is available to users

Pedro Côrte-Real pedro at pedrocr.net
Mon Sep 11 12:02:27 EDT 2006


On 8/11/06, Zed Shaw <zedshaw at zedshaw.com> wrote:
> You could put it in a mongrel.conf and just have Mongrel run it on
> start-up:
>
> mongrel_rails start -S mongrel.conf
>
> (Even though it ends in .conf it's actually Ruby code that gets run
> inside the Configurator.)

I've only now went to deploy the app and had to deal with this. The
solution you gave works but not in the way I need it to. Mongrel will
start listening on the port before rails starts up. The stuff I need
to run takes a few minutes so I don't want mongrel to be listening on
the port before the script ends. Would you consider changing this
order and making mongrel only start listening after rails has booted?
That's how webrick works.

Thanks,

Pedro.


More information about the Mongrel-users mailing list