Jedrin wrote: > Suppose I have a daemon and I run it like this: > > ruby script/runner script/my_daemon.rb > > This gives my daemon full access to the rails environment, and it may > run for days, months, many months or longer. I realized this could be > risky if there is some caching or other issues, in which case I would > launch some other external exec from the daemon instead perhaps to get > access to the environment, or possibly I could launch it the same way > and just do a fork and then do the DB operations in the child. Right > now I am just running it as shown with no such strategy.
You may want to look into the daemons gem. I've used it before and it allows you to start, stop and restart daemon processes. http://daemons.rubyforge.org/ I think daemon-kit might be another option too but I haven't used it yet. http://github.com/kennethkalmer/daemon-kit/tree/master Best, Michael Guterl -- 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

