Ruby on Rails Monday, October 29, 2012

Hi guys!

We have moved a part of our Rails app into a "service", i.e. a Ruby
script that is demonized and communicates with the main app through a
message queue.
This service needs to know about the models in the Rails app, but it
does not need a database connection. Indeed, we are making sure that
in this service, no call to the DB will be made.

How would you do that? At the moment, we are simply requiring the
models files in the service. But since they inherit from
ActiveRecord::base, it won't work if there is no connection to a DB
available.

Thanks!
Pierre

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment