Class: Recommendable::Workers::DelayedJob

Inherits:
Object
  • Object
show all
Defined in:
lib/recommendable/workers/delayed_job.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user_id) ⇒ DelayedJob

Returns a new instance of DelayedJob.



6
7
8
# File 'lib/recommendable/workers/delayed_job.rb', line 6

def initialize(user_id)
  @user_id = user_id
end

Instance Attribute Details

#user_idObject

Returns the value of attribute user_id.



4
5
6
# File 'lib/recommendable/workers/delayed_job.rb', line 4

def user_id
  @user_id
end

Instance Method Details

#performObject



10
11
12
13
# File 'lib/recommendable/workers/delayed_job.rb', line 10

def perform
  Recommendable::Helpers::Calculations.update_similarities_for(user_id)
  Recommendable::Helpers::Calculations.update_recommendations_for(user_id)
end