On Fri, May 22, 2009 at 1:56 PM, serenobs <[email protected]> wrote: > > Hello. > I've planned to use script/console to support mainloop for my rails > application. > I need some infinite loop for doing my logic. > For example, I want to give a point every second to users. > to do this task I think I simply code like this: > loop { GivePoint(); sleep 1 } on script/console > and handle taks in the GivePoint method. > > Can this way work fine on commercial application? > In fact, script/console looks like sort of helpers to test, so it may > heavy to perform business logic in real world. > Am I right? > Somebody advice on me. > > Thanks. >
You should probably do this in a background task/daemon Andrew Timberlake http://ramblingsonrails.com http://MyMvelope.com - The SIMPLE way to manage your savings --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

