Marnen Laibow-Koser wrote:
> Damjan Rems wrote:
> [...]
>> Sadly my server is Windows. I am working on an application for internal 
>> users which runs Word and Excel with ole automation a lot to provide 
>> output documents in pdf.
> 
> There are better ways to build PDF files.  If you can tell us a bit more 
> about what you're doing, perhaps we can make suggestions...
> 
>> 
>> I haven't yet had production loads but a lot of things can go wrong when 
>> running ole automation. So I thought If I could close session and 
>> restart it on demand .... ( You can always repair windows by restarting 
>> it ;-)
> 
> I think you may be anticipating a problem that may or may not exist. 
> Why don't you test it out and see if you need this feature?
> 
>> 
>> I thought that Mongrel or Webrick have some interface to end itself.
>> 
>> Thank you
>> TheR
> 
> Best,
> --
> Marnen Laibow-Koser
> http://www.marnen.org
> mar...@marnen.org

I would use something like god (http://god.rubyforge.org/) to watch the 
application for memory problems and the like. You could easily use this 
daemon to check for a "restart.txt" file and if it exists:

1. erase the file
2. restart application

Your restart method in the controller is just:

def restart
  File.open('restart.txt','wb') {}
end

and don't forget the equivalent of
before_filter :check_is_admin, :only => [:restart]

Without a daemon running, you can crash your app fine but it will lay 
down dead without any hope for resurection...

Gaspard
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to