Sha256: d4673414796915a9dbcd8c82b70c38e029e9b9a74636d309a386cad8c3507a7d
Contents?: true
Size: 773 Bytes
Versions: 33
Compression:
Stored size: 773 Bytes
Contents
# encoding: utf-8 module XapianDb module IndexWriters # Worker to update the Xapian index; the worker is used in the beanstalk worker script # and uses the DirectWriter to do the real work # @author Gernot Kogler class BeanstalkWorker include XapianDb::Utilities def index_task(options) klass = constantize options[:class] obj = klass.respond_to?(:get) ? klass.get(options[:id]) : klass.find(options[:id]) DirectWriter.index obj end def delete_doc_task(options) DirectWriter.delete_doc_with options[:xapian_id] end def reindex_class_task(options) klass = constantize options[:class] DirectWriter.reindex_class klass, :verbose => false end end end end
Version data entries
33 entries across 33 versions & 1 rubygems