[Backgroundrb-devel] Daemons closes files? (Breaks logging while testing)
nate at natemurray.com
Mon May 7 16:13:33 EDT 2007
Hey guys, I'm working really hard to get the unit tests for Workers
to work with Rails. I'm hoping I can figure it out and submit a patch.
I've made really great progress in so far as I can run basic unit
tests. I am starting up the BRB server just for the test and then
bringing it back down. I think this makes the most sense for an
accurate test and it isn't very slow.
The biggest issue I am having is that ActiveRecord::Base.logger's
file descriptor keeps getting closed and throwing tons of errors
anytime I try to do anything. (As a side note, the DB connection
seems to be rolling back before my workers have a chance to get at
it, but I think that's a different issue.) I think this is because
Daemons is closing the file, but I'm not exactly sure.
From the Daemons documentation:
6. Closes file descriptors (reopens STDOUT and STDERR to point to
a logfile if possible).
I'm guessing that Daemons is rightly trying to be its own independent
process but while doing that it seems to close the Rails logger.
Does anyone have any suggestions on how to reconcile these issues?
Testing is very important to us here as this is a production-level
business app. I really love the idea behind BackgrounDRb and I want
to contribute my changes to the community so any help would be
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Backgroundrb-devel