Skip to content

Commit

Permalink
include Sidekiq::Worker moved to SidekiqWriter
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmichaelbradley committed Jul 24, 2013
1 parent 3509f45 commit 48ebd5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion lib/xapian_db/index_writers/sidekiq_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module IndexWriters
class SidekiqWorker

extend XapianDb::Utilities
include Sidekiq::Worker if Kernel.const_defined? :Sidekiq

APPROVED_TASKS = [:index, :delete_doc, :reindex_class]

Expand Down
6 changes: 5 additions & 1 deletion lib/xapian_db/index_writers/sidekiq_writer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ module XapianDb
module IndexWriters
class SidekiqWriter

SidekiqWorker.class_eval do
include Sidekiq::Worker
end

class << self

# Update an object in the index
Expand All @@ -29,7 +33,7 @@ def reindex_class(klass, options = {})
end

def worker_class
XapianDb::IndexWriters::SidekiqWorker
SidekiqWorker
end
private :worker_class
end
Expand Down

0 comments on commit 48ebd5d

Please sign in to comment.