Hi,<br><br>I'm new to BackgroundRB and am having some trouble figuring<br>out what must be a simple thing.&nbsp; I'm in&nbsp; time crunch where I<br>need my Rails app to generate PDF files on the fly for my website<br>users.&nbsp; But before I leap into that, I'm trying to get familiar with<br>the basics.&nbsp; So I have this worker in my rails app lib/worker folder:<br>==============<br>class PdfmakerWorker &lt; BackgrounDRb::MetaWorker<br>&nbsp; set_worker_name :pdfmaker_worker<br>&nbsp; set_no_auto_load(true)<br>&nbsp; def create(args = nil)<br>&nbsp;&nbsp;&nbsp; # this method is called, when worker is loaded for the first time<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; register_status(:cnt =&gt; 0)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.upto 100000000 do |x|<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if x % 1000 == 0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; register_status(:cnt =&gt; x)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 end<br>&nbsp;&nbsp;&nbsp; #exit<br>&nbsp; end<br><br>&nbsp; def getres<br>&nbsp;&nbsp;&nbsp; res = "Just a test"<br>&nbsp;&nbsp;&nbsp; return res<br>&nbsp; end<br>end<br><br>============================================================<br><br>I've written a simple program to test that worker and it is as follows:<br><br>jk = MiddleMan.new_worker(:worker =&gt; :pdfmaker_worker, :job_key =&gt; "123", :data =&gt; nil)<br><br>sleep (5)<br><br>count = 0<br><br>while count &lt; 1 <br>&nbsp; pct = MiddleMan.ask_status(:worker =&gt; :pdfmaker_worker, :job_key =&gt; jk)<br>&nbsp; sleep(2)<br>&nbsp; puts "Count is: " + (pct[:cnt]).to_s<br>&nbsp; <br>&nbsp; res = MiddleMan.worker(:pdfmaker_worker, jk).getres<br>&nbsp; puts "Res is: " + res.to_s<br>end<br>============================================================<br><br>I run script/console and load the above program.&nbsp; The worker counts up<br>to 10000000 and my little test program repeatedly queries the worker<br>and writes
 "Count is &lt;whatever&gt;" to the screen as it should.<br><br>However, when it get to my custom method "getres" in the last<br>two lines of the test program,&nbsp; the return result for "res" is nil.&nbsp; The worker doesn't crash, it just appears not to return a result.&nbsp; I'm sure it's<br>something simple, but I don't see why.&nbsp; <br><br>Here is a sample output of one iteration of the simple program:<br>================<br>Count is: 970000000<br>{:type=&gt;:do_work, :worker=&gt;:pdfmaker_worker, :worker_method=&gt;:getres, :job_key=&gt;"123"}<br>Res is: <br>{:type=&gt;:get_status, :worker=&gt;:pdfmaker_worker, :job_key=&gt;"123"}<br>================<br><br>It looks like the call to "getres" is being recognized, but I'm obviously<br>missing some critical link.<br><br>My setup:<br><br>Ubuntu 7.10<br>Ruby 1.8.6<br>Rails 2.0.2<br>BackgroundRB (been through several versions, latest of <br>which was retrieved via svn on 4/17/08 and I updated the<br>backgroundrb script
 as per install guidelines)<br><br>Thanks in advance for your help.<br><br>Rogelio<br><br> <p>&#32;

      <hr size=1>Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile. <a href="http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ "> Try it now.</a>