lib/recommendable/workers/sidekiq.rb in recommendable-2.0.0 vs lib/recommendable/workers/sidekiq.rb in recommendable-2.0.0.20121011

- old
+ new

@@ -1,9 +1,11 @@ module Recommendable module Workers class Sidekiq - include ::Sidekiq::Worker - sidekiq_options :unique => true, :queue => :recommendable + if defined?(::Sidekiq) + include ::Sidekiq::Worker + sidekiq_options :unique => true, :queue => :recommendable + end def perform(user_id) Recommendable::Helpers::Calculations.update_similarities_for(user_id) Recommendable::Helpers::Calculations.update_recommendations_for(user_id) end