views:

144

answers:

1

It seems like due to the threading issue logger.warn (thats what I tested) doesn't generate any output? my code is similar to this:

def deliver(args)
  logger.info "delivery start"
  thread_pool.defer(:deliver_deferred, args)
  logger.info "delivery end"
end

def deliver_deferred(args)
  logger.warn "whatsoever"
end

Any idea?

A: 

I'm not sure about the specifics, but assuming BackgrounDRb runs as a forked process, any open files would be closed for the forked child process. This would likely manifest itself as what you're seeing.

However, I would've assumed that BackgrounDRb would've been smart enough to handle that, since it ought to be a pretty obvious issue.

Bob Aman