gernotkogler/xapian_db

ResqueWriter isn't loaded

Closed this issue · 1 comments

Hi, Gernot.

After commit 6600835 resque isn't required, which is good, but I think a new problem has been introduced.

If you don't have beanstalk-client but try to use the resque writer (as in my case), the following code:

begin
   require File.dirname(__FILE__) + '/xapian_db/index_writers/beanstalk_writer'
   require File.dirname(__FILE__) + '/xapian_db/index_writers/resque_writer'
rescue LoadError
end

It throws an exception when requiring the beanstalk writer, so the line requiring the resque writer isn't loaded.

I'm no expert in LoadErrors, but separating the lines in two different begin...rescue seems to work.

Thanks!

Thanks for the hint! Fixed in 1.2.1.1