<div dir="ltr"><span class="Apple-style-span" style="border-collapse: collapse; ">Hi, I&#39;ve had a project using a really old version of backgroundrb (don&#39;t remember which one) to simply send out some e-mails in the background. I&#39;m currently trying to upgrade the project so that I can learn more about backgroundrb and use some of its other features.<div>
<br></div><div>I&#39;ve tried rewriting my worker call to work with the latest version (see below), but every time I try it, the debug log simply prints &#39;Client disconected&#39; and nothing happens. Am I doing something wrong?</div>
<div><br></div><div>In my controller:</div><div><br></div><div><div>MiddleMan.worker(:david_worker).async_do_work(:args =&gt; { :email =&gt; @user.email,</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:url =&gt; @user.reset_password_code,</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:mail_type =&gt; :forgot_password_email })</div><div><br></div><div>-------------------</div><div><br></div><div>In my worker:</div><div><br></div><div><div>&nbsp;&nbsp;set_worker_name :david_worker</div>
<div>&nbsp;&nbsp;</div><div>&nbsp;&nbsp;def create(args = nil)</div><div>&nbsp;&nbsp; &nbsp;# this method is called, when worker is loaded for the first time</div><div>&nbsp;&nbsp;end</div><div>&nbsp;&nbsp;</div><div>&nbsp;&nbsp;def do_work(args)</div><div>&nbsp;&nbsp; &nbsp;Notifier.send(&quot;deliver_#{args[:mail_type]}&quot;, args)</div>
<div>&nbsp;&nbsp;end</div></div><div><br></div><div>Thanks in advance for any tips!</div></div></span><br>-- <br>-Grant Blakeman<br><a href="mailto:grant.blakeman@gmail.com">grant.blakeman@gmail.com</a><br><a href="http://grantblakeman.com">http://grantblakeman.com</a><br>

</div>