Hah! I've been hacking around this for hours today.<br><br>My old solution was something like this in config/backgroundrb.yml:<br>=============<br><%<br> ports = {<br> 'development' => 2000,<br> 'production' => 2001,<br>
'demo' => 2002,<br> 'sandbox' => 2003<br> }<br>%><br>---<br>:backgroundrb:<br> :port: <%= ports[ENV['RAILS_ENV']] %><br> :environment: <%= ENV['RAILS_ENV'] %><br>
:ip: <a href="http://127.0.0.1/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">127.0.0.1</a><br>=============<br><br>But
that failed when I started starting bdrb with capistrano because I
couldn't set RAILS_ENV (have to run bdrb sudo -u nobody). So my
solution was to create config files for each environment that are
symlinked into the new cap-created directory.<br>
<br>I'd agree that setting RAILS_ENV is unoptimal. It does really
unexpected things if you're relying on RAILS_ENV after starting bdrb.<br><br><div><span class="gmail_quote">On 2/6/08, <b class="gmail_sendername">George Feil</b> <<a href="mailto:gfeil@realgirlsmedia.com">gfeil@realgirlsmedia.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p><font face="Georgia" size="2"><span style="font-size: 10pt; font-family: Georgia;">In the process of integrating BackgrounDRb into my company's
CRM application for our web site, I have run against two roadblocks in
configuration that required my actually modifying the BackgrounDRb source code
to work around:</span></font></p>
<p><font face="Georgia" size="2"><span style="font-size: 10pt; font-family: Georgia;"> </span></font></p>
<ol style="margin-top: 0in;" start="1" type="1">
<li><font face="Georgia" size="2"><span style="font-size: 10pt; font-family: Georgia;">The MasterProxy class
overrides the RAILS_ENV settings with the settings in the
backgroundrb.yml, or sets the environment to "development" if
not set. This makes it impossible to allow the server to run in multiple
configuration environments (e.g. staging and production, for example). In
my opinion, it would be best to have MasterProxy rely solely on the current
setting of RAILS_ENV, and never override it under any circumstances.</span></font></li>
<li><font face="Georgia" size="2"><span style="font-size: 10pt; font-family: Georgia;">DebugMaster supports only logging
options: log to files with hard-coded names, or log to stdout. In our
clustered production environment, we use SyslogLogger to send all logging
messages to a remote server, in order to maintain logs for all our servers
in one place. There appears to be no way to do this in BackgrounDRb
without modifying the behavior of DebugMaster.</span></font></li>
</ol>
<p><font face="Georgia" size="2"><span style="font-size: 10pt; font-family: Georgia;"> </span></font></p>
<p><font face="Georgia" size="2"><span style="font-size: 10pt; font-family: Georgia;">Apart from these two issues, this is a great tool for asynchronous
processing. Thanks!</span></font></p>
<p><font face="Georgia" size="2"><span style="font-size: 10pt; font-family: Georgia;"> </span></font></p>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><img src="cid:image001.jpg@01C868DE.CB25A710" align="bottom" border="0" height="60" width="228"></span></font></p>
<p><font face="Arial" size="1"><span style="font-size: 7.5pt; font-family: Arial;">George Feil | Senior Software Engineer</span></font></p>
<p><font face="Arial" size="1"><span style="font-size: 7.5pt; font-family: Arial;"><a href="http://www.realgirlsmedia.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">www.realgirlsmedia.com</a></span></font></p>
<p><font face="Arial" size="1"><span style="font-size: 7.5pt; font-family: Arial;"><a href="http://www.divinecaroline.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">www.divinecaroline.com</a></span></font></p>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
</div>
</div>
<br>_______________________________________________<br>Backgroundrb-devel mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Backgroundrb-devel@rubyforge.org">Backgroundrb-devel@rubyforge.org</a><br>
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://rubyforge.org/mailman/listinfo/backgroundrb-devel" target="_blank">http://rubyforge.org/mailman/listinfo/backgroundrb-devel</a><br></blockquote></div>
<br>