Hi, we are trying to use BDRB for background processing of long-running reports, and have two issues - one is that worker does not see our Report class from Rails, throws a: /var/apps/ror_trunk/vendor/plugins/backgroundrb/server/master_worker.rb:22:in `load'': undefined class/module Report (ArgumentError) from /var/apps/ror_trunk/vendor/plugins/backgroundrb/server/master_worker.rb:22:in `receive_data'' And the other is - does this new release work on Windows which some of our developers use? I know that last releases did not work because of fork() issues, but the new rewrite has a new networking model, so do you think it might work with some workarounds? thanks for your help!
On Wed, 2007-12-12 at 20:07 +0300, Ivan S. Manida wrote:> Hi, > > we are trying to use BDRB for background processing of long-running > reports, and have two issues - one is that worker does not see our > Report class from Rails, throws a: > > /var/apps/ror_trunk/vendor/plugins/backgroundrb/server/master_worker.rb:22:in > `load'': undefined class/module Report (ArgumentError) > from > /var/apps/ror_trunk/vendor/plugins/backgroundrb/server/master_worker.rb:22:in > `receive_data'' > > And the other is - does this new release work on Windows which some > of our developers use? I know that last releases did not work > because of fork() issues, but the new rewrite has a new networking > model, so do you think it might work with some workarounds?No, It won''t work on Windows still, because of process creation model. Although, one can probably fix it with Win32 emulation API. Where is this Report class defined? is it a model or loaded from plugins? any code that you are using would be helpful. Technically however, you can put a explicit require of file that defines the class and see if it works. -- Let them talk of their oriental summer climes of everlasting conservatories; give me the privilege of making my own summer with my own coals. http://gnufied.org
> On Wed, 2007-12-12 at 20:07 +0300, Ivan S. Manida wrote: >> we are trying to use BDRB for background processing of long-running >> reports, and have two issues - one is that worker does not see our >> Report class from Rails, throws a: >> >> /var/apps/ror_trunk/vendor/plugins/backgroundrb/server/master_worker.rb:22:in >> `load'': undefined class/module Report (ArgumentError) >> from >> /var/apps/ror_trunk/vendor/plugins/backgroundrb/server/master_worker.rb:22:in >> `receive_data''hemant kumar wrote:> Where is this Report class defined? is it a model or loaded from > plugins? any code that you are using would be helpful. > > Technically however, you can put a explicit require of file that defines > the class and see if it works. >It''s a standard ruby model, just not one inherited from the ActiveRecord::Base. I tried "require"''ing it explicitly but then it complains about other models (ActiveRecord ones) used in the report generation. Seems that bdrb is not picking up models in "app/models" at all.
On Thu, 2007-12-13 at 21:30 +0300, Ivan Manida wrote:> > On Wed, 2007-12-12 at 20:07 +0300, Ivan S. Manida wrote: > >> we are trying to use BDRB for background processing of long-running > >> reports, and have two issues - one is that worker does not see our > >> Report class from Rails, throws a: > >> > >> /var/apps/ror_trunk/vendor/plugins/backgroundrb/server/master_worker.rb:22:in > >> `load'': undefined class/module Report (ArgumentError) > >> from > >> /var/apps/ror_trunk/vendor/plugins/backgroundrb/server/master_worker.rb:22:in > >> `receive_data'' > > hemant kumar wrote: > > Where is this Report class defined? is it a model or loaded from > > plugins? any code that you are using would be helpful. > > > > Technically however, you can put a explicit require of file that defines > > the class and see if it works. > > > > It''s a standard ruby model, just not one inherited from the > ActiveRecord::Base. I tried "require"''ing it explicitly but > then it complains about other models (ActiveRecord ones) used > in the report generation. Seems that bdrb is not picking up > models in "app/models" at all.This is weird, I am using models in couple of my apps and it works fine. Anyways, just send me the worker code ( if possible model code too ) and complete backtrace of the error. It shouldn''t be a problem. -- Let them talk of their oriental summer climes of everlasting conservatories; give me the privilege of making my own summer with my own coals. http://gnufied.org