Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-11-25 19:10:25 +0300
committerRémy Coutable <remy@rymai.me>2017-04-14 16:20:55 +0300
commit3cb84e06b7a118fb46b4e1e0d4885026c9d4a4d1 (patch)
treeef622687724fd429f6f7fb02a19a022550bf8608 /app/services/users
parent2951a8543ef97ceb1bcaca5f5140d822729c950b (diff)
Remove user activities table and use redis instead of PG for recording activities
Refactored specs and added a post deployment migration to remove the activity users table.
Diffstat (limited to 'app/services/users')
-rw-r--r--app/services/users/activity_service.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/services/users/activity_service.rb b/app/services/users/activity_service.rb
index b81f947cd01..483821b7f01 100644
--- a/app/services/users/activity_service.rb
+++ b/app/services/users/activity_service.rb
@@ -14,13 +14,9 @@ module Users
private
def record_activity
- user_activity.touch
+ @author.record_activity
Rails.logger.debug("Recorded activity: #{@activity} for User ID: #{@author.id} (username: #{@author.username}")
end
-
- def user_activity
- UserActivity.find_or_initialize_by(user: @author)
- end
end
end