Sarat Kongara
2008-May-21 04:37 UTC
[Backgroundrb-devel] How to know the environment (development/test/production) inside a worker
Hi Guys,You can start backgroundRb in different environments using -e option. ./script/backgroundrb -e production I like to run a rake task from my worker - something like rake RAILS_ENV=proper_environment thinking_sphinx:start I am not sure how to figure out the environment with which the backgroundRb is started from inside a worker task. Any help is appreciated. Thanks for your time. Regards Sarat -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080521/942a121b/attachment.html>
Ryan Leavengood
2008-May-22 05:05 UTC
[Backgroundrb-devel] How to know the environment (development/test/production) inside a worker
On 5/21/08, Sarat Kongara <saratkongara at gmail.com> wrote:> > I am not sure how to figure out the environment with which the backgroundRb > is started from inside a worker task. Any help is appreciated. Thanks for > your time.ENV["RAILS_ENV"] is defined properly inside the workers. Ryan
Sarat Kongara
2008-May-29 10:05 UTC
[Backgroundrb-devel] How to know the environment (development/test/production) inside a worker
Hi Ryan,For some reason even when the I start backgroundrb like this $ script/server -e production start The RAILS_ENV is set to development. Any suggestions on how to fix this issue. Thanks. Regards Sarat On 5/22/08, Ryan Leavengood <leavengood at gmail.com> wrote:> > On 5/21/08, Sarat Kongara <saratkongara at gmail.com> wrote: > > > > I am not sure how to figure out the environment with which the > backgroundRb > > is started from inside a worker task. Any help is appreciated. Thanks for > > your time. > > > ENV["RAILS_ENV"] is defined properly inside the workers. > > > Ryan >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080529/4bae61fa/attachment.html>