On 13/10/2010, at 10:59 AM, Joshua Partogi wrote:
Thanks for the suggestion. Didn't thought of that also. My next
question would be, where do I put the code to start the em timers?
Initializers? Thanks for the enlightment.

It's a good question - I've done this stuff in async_sinatra not Rails yet.
See my fork of that gem, there's an example of using an EM::Channel.

I'd start it in initializers (check that works though!) but I think I'd want to keep some global indicator of the timer being set, so that any code which accesses the Trends can verify that it's still running, and kicks it off again.

Come to that, you might be able to start it on first use and just keep it
running... depending on whether you need can or need to create the
interim data retroactively.

Clifford Heath.
http://github.com/cjheath

--
You received this message because you are subscribed to the Google Groups "Ruby or 
Rails Oceania" 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/rails-oceania?hl=en.

Reply via email to