davidcelis/recommendable

View on GitHub
lib/recommendable/workers/sidekiq.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Recommendable
  module Workers
    class Sidekiq
      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
    end
  end
end