[Backgroundrb-devel] BackgrounDRb not working properly with files ?

Tim Anglade tim.anglade at gmail.com
Wed Jul 19 11:43:54 EDT 2006

Hey there, thanks for the quick response !

On 7/19/06, Ezra Zygmuntowicz <ezmobius at gmail.com> wrote:

> Hey Tim-
>         The first thing I would think of is that you are not passing an
> absolute path to this worker. Can you verify? What is the exact path
> you pass in to kick this worker off?  There should not be an issue
> with using any of the code you have in a worker, it should work fine.
> This line:
> > if File.directory?(args)
> Makes me think that the rest of your code is just getting skipped
> because the directory may not exist? Can you show me the call you use
> in rails to kick this off? Also I would put some @logger.debug
> statements inside your worker there so you can see which parts of the
> code actually get run when you kick it off.
> Thanks
> -Ezra
Thanks for the input, alas the code is not getting skipped, as I can
see debugging lines (I've got some 'puts' thrown around), and the new
clips and records are being created.

Also, there is no error thrown anywhere, and the problem obviously
comes from this line:
rec = cl.records.new(:path => fl)

which obviously does not work as intended _and_  still does not throw
an error... At first I thought (logically) that the error was on
file_column's side, but at the same time, this line does work as
intended in the console, so the origin of the problem does seem to
come from BackgrounDRb.
Is there any reason why files would not be passed correctly from a
worker to file_column ?

I'm thinking this is some kind of linking error between the
backgroundrb daemon and the rails models. BackgrounDRb might very well
think that :path is a standard field and throw fl at him, while if use
the same line within Rails, it will trigger file_column functions to
assign the field correctly.

Thanks again and Cheers,

More information about the Backgroundrb-devel mailing list