Hi, All<br><br>Appreciate all the assistance, turns out this is a problem resulting from <br><br>Rails &lt;= 2.1.1 and Postgres (to do with the way binary fields are escaped) <br><br>I upgraded Rails and it works.<br><br>Thanks<br>
Justin<br><br><div class="gmail_quote">On Sat, Mar 14, 2009 at 11:07 AM, Justin Wood <span dir="ltr">&lt;<a href="mailto:justin.wood@trifectagis.com">justin.wood@trifectagis.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi, Hemant<br><br>Ah ok.   Found out where it was making the call in in meta_worker and saw the args coming back nil from load_data.   So I ran this in IRB<br><br>&gt;&gt; job=BdrbJobQueue.find(:first,:conditions =&gt; [&quot; worker_name = ? AND taken = ? AND scheduled_at &lt;= ? &quot;, &quot;notification_worker&quot;, 0, Time.now.utc ])<br>

=&gt; #&lt;BdrbJobQueue id: 53, args: &quot;\\004\\010\&quot;\\011asdf&quot;, worker_name: &quot;notification_worker&quot;, worker_method: &quot;asdf&quot;, job_key: &quot;Fri Mar 13 16:14:48 +1300 2009&quot;, taken: 0, finished: 0, timeout: nil, priority: nil, submitted_at: &quot;2009-03-13 03:14:48&quot;, started_at: nil, finished_at: nil, archived_at: nil, tag: nil, submitter_info: nil, runner_info: nil, worker_key: &quot;&quot;, scheduled_at: &quot;2009-03-13 03:14:51&quot;&gt;<br>

&gt;&gt; job.args<br>=&gt; &quot;\\004\\010\&quot;\\011asdf&quot;<br>&gt;&gt; Marshal.load(job.args)<br>TypeError: incompatible marshal file format (can&#39;t be read)<br>        format version 4.8 required; 92.48 given<br>

        from (irb):10:in `load&#39;<br>        from (irb):10<br><br>So the problem is with marshalling ... double checked that by putting a logger statement into BdrbServerHelper&#39;s load_data like so:<br> <br>...<br>rescue<br>

        error_msg = $!.message<br>        logger.error(&quot;Error marshaling data:  #{data}  #{error_msg})     #added<br>        if error_msg =~ /^undefined\ .+\ ([A-Z].+)/<br>....<br><div class="gmail_quote"><br>and got the same error message.   Having something going to the log in the rescue there would be a useful addition.<br>

<br>I&#39;m using Postgres 8.3.1 (database in utf8) on Ubuntu found someone else that encountered a marshalling error here:<br><br><a href="http://blade.nagaokaut.ac.jp/ruby/ruby-talk/116099" target="_blank">http://blade.nagaokaut.ac.jp/ruby/ruby-talk/116099</a><br>

<br>Looks like a ruby/Postgres issue?    I&#39;ll have a look see if I can sort this out but any advice you could give me would be much appreciated.<br><br>Thanks<br><font color="#888888">Justin</font><div><div></div><div class="h5">
<br><br><br>On Fri, Mar 13, 2009 at 8:58 PM, hemant <span dir="ltr">&lt;<a href="mailto:gethemant@gmail.com" target="_blank">gethemant@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>On Fri, Mar 13, 2009 at 11:57 AM, Justin Wood<br>
&lt;<a href="mailto:justin.wood@trifectagis.com" target="_blank">justin.wood@trifectagis.com</a>&gt; wrote:<br>
&gt; Hi, Samer<br>
&gt;<br>
&gt; Thanks for the quick reply.   I changed things a bit and ran this<br>
&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; MiddleMan.new_worker(:worker=&gt;:notification_worker,:worker_key=&gt;&#39;testkey&#39;,:data=&gt;&quot;data<br>
&gt;&gt;&gt; arguement&quot;)<br>
&gt; =&gt; &quot;testkey&quot;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; MiddleMan.worker(:notification_worker,&#39;testkey&#39;).enq_send_warranty_notice(:job_key=&gt;Time.now.to_s,:arg<br>
&gt;&gt;&gt; =&gt; &quot;asdf&quot;,:scheduled_at =&gt; Time.now + 3.second)<br>
&gt; =&gt; true<br>
&gt;<br>
&gt; ... but the arg is still not being passed.<br>
&gt;<br>
&gt; My understanding of new_worker is it explictly creates a worker for you that<br>
&gt; you can refer to by the key, so<br>
&gt;<br>
&gt; If I do this:<br>
&gt;<br>
&gt;       MiddleMan.worker(:notification_worker,&#39;testkey&#39;)<br>
&gt;<br>
&gt; I&#39;m getting the worker I created above but when I call this:<br>
&gt;<br>
&gt;      MiddleMan.worker(:notification_worker)<br>
&gt;<br>
&gt; I&#39;m getting the default worker that was created at startup.<br>
&gt;<br>
&gt; Regardless of how the worker is created the &quot;arg&quot; parameter is still not<br>
&gt; being passed when it gets invoked to do enqued work.   Going through the<br>
&gt; code ... I can&#39;t figure out how it gets invoked.<br>
&gt;<br>
<br>
</div>Well whatever you pass to enq_xxx method gets marshalled to database<br>
and gets unmarshalled from table when the task is scheduled inside<br>
worker. Can you paste your worker code?<br>
</blockquote></div></div></div><br>
</blockquote></div><br>